LH-265-enable-audio-in-mediasoup #16
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user