This commit is contained in:
Sergiu Toma 2022-12-19 12:33:19 +02:00
parent 714fe0ec5e
commit 28059144cf
2 changed files with 28 additions and 2 deletions

View File

@ -20387,7 +20387,20 @@ let consumerAudio // local consumer audio(consumer not transport)
const remoteSoundControl = document.getElementById('remoteSoundControl');
remoteSoundControl.addEventListener('click', function handleClick() {
btn.textContent = 'Button clicked';
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
remoteSoundControl.textContent = 'Button clicked';
// let soundElementIcon = document.getElementById('sound')
// if (isSoundOn) {
// soundElementIcon.src = noSoundImage
// soundElementIcon.alt = 'no-sound-image'
// isSoundOn = false
// vid.muted = !isSoundOn
// } else {
// soundElementIcon.src = soundImage
// soundElementIcon.alt = 'sound-image'
// isSoundOn = true
// vid.muted = !isSoundOn
// }
});
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions

View File

@ -29,7 +29,20 @@ let consumerAudio // local consumer audio(consumer not transport)
const remoteSoundControl = document.getElementById('remoteSoundControl');
remoteSoundControl.addEventListener('click', function handleClick() {
btn.textContent = 'Button clicked';
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
remoteSoundControl.textContent = 'Button clicked';
// let soundElementIcon = document.getElementById('sound')
// if (isSoundOn) {
// soundElementIcon.src = noSoundImage
// soundElementIcon.alt = 'no-sound-image'
// isSoundOn = false
// vid.muted = !isSoundOn
// } else {
// soundElementIcon.src = soundImage
// soundElementIcon.alt = 'sound-image'
// isSoundOn = true
// vid.muted = !isSoundOn
// }
});
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions