WIP: router-close-connections #2

Closed
sergiu wants to merge 13 commits from router-close-connections into master
Showing only changes of commit ab540b276a - Show all commits

View File

@ -208,7 +208,7 @@ const getRtpCapabilities = () => {
const createSendTransport = () => { const createSendTransport = () => {
setTimeout(() => {
const answer = { const answer = {
origin_asset_id: ASSET_ID, origin_asset_id: ASSET_ID,
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')), dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),
@ -225,6 +225,7 @@ const createSendTransport = () => {
JSON.stringify(answer) JSON.stringify(answer)
); );
// see server's socket.on('createWebRtcTransport', sender?, ...) // see server's socket.on('createWebRtcTransport', sender?, ...)
// this is a call from Producer, so sender = true // this is a call from Producer, so sender = true
socket.emit('createWebRtcTransport', { sender: true, callId }, ({ params }) => { socket.emit('createWebRtcTransport', { sender: true, callId }, ({ params }) => {
@ -286,6 +287,10 @@ const createSendTransport = () => {
}) })
connectSendTransport() connectSendTransport()
}) })
}, 7000);
} }
const connectSendTransport = async () => { const connectSendTransport = async () => {