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) { } catch (error) {
console.log('sssss22222', error.message); console.log('sssss22222', error.message);
} }
console.log('videoCalls[callId].receiverConsumerVideo', videoCalls[callId].receiverConsumerVideo);
console.log('videoCalls[callId].receiverConsumerAudio', videoCalls[callId].receiverConsumerAudio);
} }
} catch (error) { } catch (error) {
console.error(`[consumer-resume] | ERROR | callId: ${socketDetails[socket.id]} | isInitiator: ${isInitiator} | error: ${error.message}`); console.error(`[consumer-resume] | ERROR | callId: ${socketDetails[socket.id]} | isInitiator: ${isInitiator} | error: ${error.message}`);

View File

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

View File

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