LINXD-2270-p2 #19
@ -20385,22 +20385,17 @@ let consumerVideo // local consumer video(consumer not transport)
|
|||||||
let consumerAudio // local consumer audio(consumer not transport)
|
let consumerAudio // local consumer audio(consumer not transport)
|
||||||
|
|
||||||
const remoteSoundControl = document.getElementById('remoteSoundControl');
|
const remoteSoundControl = document.getElementById('remoteSoundControl');
|
||||||
|
remoteSoundControl.defaultMuted = true
|
||||||
|
|
||||||
remoteSoundControl.addEventListener('click', function handleClick() {
|
remoteSoundControl.addEventListener('click', function handleClick() {
|
||||||
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
||||||
remoteSoundControl.textContent = 'Button clicked';
|
if (remoteSoundControl.textContent === 'Unmute') {
|
||||||
// let soundElementIcon = document.getElementById('sound')
|
vid.muted = false
|
||||||
// if (isSoundOn) {
|
remoteSoundControl.textContent = 'Mute';
|
||||||
// soundElementIcon.src = noSoundImage
|
} else {
|
||||||
// soundElementIcon.alt = 'no-sound-image'
|
vid.muted = true
|
||||||
// isSoundOn = false
|
remoteSoundControl.textContent = 'Unmute';
|
||||||
// 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
|
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="sharedBtns">
|
<div id="sharedBtns">
|
||||||
<video id="remoteVideo" autoplay class="video" ></video>
|
<video id="remoteVideo" autoplay class="video" muted></video>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -27,22 +27,17 @@ let consumerVideo // local consumer video(consumer not transport)
|
|||||||
let consumerAudio // local consumer audio(consumer not transport)
|
let consumerAudio // local consumer audio(consumer not transport)
|
||||||
|
|
||||||
const remoteSoundControl = document.getElementById('remoteSoundControl');
|
const remoteSoundControl = document.getElementById('remoteSoundControl');
|
||||||
|
remoteSoundControl.defaultMuted = true
|
||||||
|
|
||||||
remoteSoundControl.addEventListener('click', function handleClick() {
|
remoteSoundControl.addEventListener('click', function handleClick() {
|
||||||
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
||||||
remoteSoundControl.textContent = 'Button clicked';
|
if (remoteSoundControl.textContent === 'Unmute') {
|
||||||
// let soundElementIcon = document.getElementById('sound')
|
vid.muted = false
|
||||||
// if (isSoundOn) {
|
remoteSoundControl.textContent = 'Mute';
|
||||||
// soundElementIcon.src = noSoundImage
|
} else {
|
||||||
// soundElementIcon.alt = 'no-sound-image'
|
vid.muted = true
|
||||||
// isSoundOn = false
|
remoteSoundControl.textContent = 'Unmute';
|
||||||
// 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
|
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions
|
||||||
|
Loading…
Reference in New Issue
Block a user