LH-276: Update producer close event handler

This commit is contained in:
Sergiu Toma 2023-02-21 01:50:43 +02:00
parent 68db146643
commit 0230e668e4
3 changed files with 8 additions and 6 deletions

2
app.js
View File

@ -506,6 +506,8 @@ peers.on('connection', async (socket) => {
} catch (error) {
console.log('sssss22222', error.message);
}
console.log('videoCalls[callId].receiverConsumerVideo', videoCalls[callId].receiverConsumerVideo);
console.log('videoCalls[callId].receiverConsumerAudio', videoCalls[callId].receiverConsumerAudio);
}
} catch (error) {
console.error(`[consumer-resume] | ERROR | callId: ${socketDetails[socket.id]} | isInitiator: ${isInitiator} | error: ${error.message}`);

View File

@ -20832,14 +20832,14 @@ const connectRecvTransport = async () => {
console.log('❗ Don\'t have AUDIO stream to consume');
}
socket.emit('consumer-resume')
remoteVideo.srcObject = stream
remoteVideo.setAttribute('autoplay', true)
remoteVideo.play()
.then(() => {
console.log('remoteVideo PLAY')
socket.emit('consumer-resume')
})
.catch((error) => {
displayError(`remoteVideo PLAY ERROR | ${error.message}`)

View File

@ -474,14 +474,14 @@ const connectRecvTransport = async () => {
console.log('❗ Don\'t have AUDIO stream to consume');
}
socket.emit('consumer-resume')
remoteVideo.srcObject = stream
remoteVideo.setAttribute('autoplay', true)
remoteVideo.play()
.then(() => {
console.log('remoteVideo PLAY')
socket.emit('consumer-resume')
})
.catch((error) => {
displayError(`remoteVideo PLAY ERROR | ${error.message}`)