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