Update build

This commit is contained in:
Sergiu Toma 2022-11-22 20:00:44 +02:00
parent 4e4cd6f893
commit 544e9e59ab
2 changed files with 28 additions and 2 deletions

View File

@ -20638,7 +20638,7 @@ const createSendTransport = () => {
})
producerTransport.on('produce', async (parameters, callback, errback) => {
console.log('[produce] parameters', parameters)
console.log('[produce] parameters', parameters)
try {
// tell the server to create a Producer
@ -20683,6 +20683,18 @@ const connectSendTransport = async () => {
// close video track
})
producerAudio = await producerTransport.produce(audioParams)
producerAudio.on('trackended', () => {
console.log('track ended')
// close video track
})
producerAudio.on('transportclose', () => {
console.log('transport ended')
// close video track
})
const answer = {
origin_asset_id: ASSET_ID,
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),
@ -20751,6 +20763,7 @@ const resetCallSettings = () => {
remoteVideo.srcObject = null
consumer = null
producerVideo = null
producerAudio = null
producerTransport = null
consumerTransport = null
device = undefined

View File

@ -280,7 +280,7 @@ const createSendTransport = () => {
})
producerTransport.on('produce', async (parameters, callback, errback) => {
console.log('[produce] parameters', parameters)
console.log('[produce] parameters', parameters)
try {
// tell the server to create a Producer
@ -325,6 +325,18 @@ const connectSendTransport = async () => {
// close video track
})
producerAudio = await producerTransport.produce(audioParams)
producerAudio.on('trackended', () => {
console.log('track ended')
// close video track
})
producerAudio.on('transportclose', () => {
console.log('transport ended')
// close video track
})
const answer = {
origin_asset_id: ASSET_ID,
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),
@ -393,6 +405,7 @@ const resetCallSettings = () => {
remoteVideo.srcObject = null
consumer = null
producerVideo = null
producerAudio = null
producerTransport = null
consumerTransport = null
device = undefined