LINXD-2270-p2 #19
@ -20368,6 +20368,7 @@ const ASSET_NAME = urlParams.get('assetName') || null;
|
||||
const ASSET_TYPE = urlParams.get('assetType') || null;
|
||||
let callId = parseInt(urlParams.get('callId')) || null;
|
||||
const IS_PRODUCER = urlParams.get('producer') === 'true' ? true : false
|
||||
let remoteVideo = document.getElementById('remoteVideo')
|
||||
console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId', callId, ' | IS_PRODUCER', IS_PRODUCER)
|
||||
|
||||
console.log('🟩 config', config)
|
||||
@ -20390,10 +20391,10 @@ remoteSoundControl.defaultMuted = true
|
||||
remoteSoundControl.addEventListener('click', function handleClick() {
|
||||
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
||||
if (remoteSoundControl.textContent === 'Unmute') {
|
||||
remoteSoundControl.muted = false
|
||||
remoteVideo.muted = false
|
||||
remoteSoundControl.textContent = 'Mute';
|
||||
} else {
|
||||
remoteSoundControl.muted = true
|
||||
remoteVideo.muted = true
|
||||
remoteSoundControl.textContent = 'Unmute';
|
||||
}
|
||||
});
|
||||
@ -20787,9 +20788,10 @@ const connectRecvTransport = async () => {
|
||||
|
||||
// Maybe the unit does not produce video or audio, so we must only consume what is produced
|
||||
if (videoParams) {
|
||||
console.log('❗ Have VIDEO stream to consume');
|
||||
stream.addTrack(await getVideoTrask(videoParams))
|
||||
} else {
|
||||
console.log('❗ Have VIDEO stream to consume');
|
||||
console.log('❗ Don\'t have AUDIO stream to consume');
|
||||
}
|
||||
|
||||
if (audioParams) {
|
||||
@ -20804,7 +20806,6 @@ const connectRecvTransport = async () => {
|
||||
|
||||
socket.emit('consumer-resume')
|
||||
|
||||
let remoteVideo = document.getElementById('remoteVideo')
|
||||
remoteVideo.srcObject = stream
|
||||
remoteVideo.setAttribute('autoplay', true)
|
||||
remoteVideo.setAttribute('muted', false)
|
||||
|
@ -10,6 +10,7 @@ const ASSET_NAME = urlParams.get('assetName') || null;
|
||||
const ASSET_TYPE = urlParams.get('assetType') || null;
|
||||
let callId = parseInt(urlParams.get('callId')) || null;
|
||||
const IS_PRODUCER = urlParams.get('producer') === 'true' ? true : false
|
||||
let remoteVideo = document.getElementById('remoteVideo')
|
||||
console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId', callId, ' | IS_PRODUCER', IS_PRODUCER)
|
||||
|
||||
console.log('🟩 config', config)
|
||||
@ -32,10 +33,10 @@ remoteSoundControl.defaultMuted = true
|
||||
remoteSoundControl.addEventListener('click', function handleClick() {
|
||||
console.log('remoteSoundControl.textContent', remoteSoundControl.textContent);
|
||||
if (remoteSoundControl.textContent === 'Unmute') {
|
||||
remoteSoundControl.muted = false
|
||||
remoteVideo.muted = false
|
||||
remoteSoundControl.textContent = 'Mute';
|
||||
} else {
|
||||
remoteSoundControl.muted = true
|
||||
remoteVideo.muted = true
|
||||
remoteSoundControl.textContent = 'Unmute';
|
||||
}
|
||||
});
|
||||
@ -429,9 +430,10 @@ const connectRecvTransport = async () => {
|
||||
|
||||
// Maybe the unit does not produce video or audio, so we must only consume what is produced
|
||||
if (videoParams) {
|
||||
console.log('❗ Have VIDEO stream to consume');
|
||||
stream.addTrack(await getVideoTrask(videoParams))
|
||||
} else {
|
||||
console.log('❗ Have VIDEO stream to consume');
|
||||
console.log('❗ Don\'t have AUDIO stream to consume');
|
||||
}
|
||||
|
||||
if (audioParams) {
|
||||
@ -446,7 +448,6 @@ const connectRecvTransport = async () => {
|
||||
|
||||
socket.emit('consumer-resume')
|
||||
|
||||
let remoteVideo = document.getElementById('remoteVideo')
|
||||
remoteVideo.srcObject = stream
|
||||
remoteVideo.setAttribute('autoplay', true)
|
||||
remoteVideo.setAttribute('muted', false)
|
||||
|
Loading…
Reference in New Issue
Block a user