Refactor transportclose 2
This commit is contained in:
parent
05f4985075
commit
e5fbb1e5a7
@ -399,24 +399,23 @@ const connectRecvTransport = async () => {
|
||||
|
||||
const closeCall = () => {
|
||||
console.log('closeCall', callId);
|
||||
|
||||
socket.emit('transportclose', { callId })
|
||||
// Reset settings and send closeTransport to video server
|
||||
resetCallSettings()
|
||||
// resetCallSettings()
|
||||
|
||||
// Emit 'notify-end' to Hub so the consumer will know to close the video
|
||||
const notifyEnd = {
|
||||
origin_asset_id: ASSET_ID,
|
||||
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),
|
||||
type: 'notify-end',
|
||||
video_call_id: callId
|
||||
}
|
||||
console.log('notifyEnd', notifyEnd)
|
||||
hub.emit('video', JSON.stringify(notifyEnd))
|
||||
|
||||
// Disable Close call button
|
||||
const closeCallBtn = document.getElementById('btnCloseCall')
|
||||
closeCallBtn.setAttribute('disabled', '')
|
||||
// // Emit 'notify-end' to Hub so the consumer will know to close the video
|
||||
// const notifyEnd = {
|
||||
// origin_asset_id: ASSET_ID,
|
||||
// dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),
|
||||
// type: 'notify-end',
|
||||
// video_call_id: callId
|
||||
// }
|
||||
// console.log('notifyEnd', notifyEnd)
|
||||
// hub.emit('video', JSON.stringify(notifyEnd))
|
||||
|
||||
// // Disable Close call button
|
||||
// const closeCallBtn = document.getElementById('btnCloseCall')
|
||||
// closeCallBtn.setAttribute('disabled', '')
|
||||
}
|
||||
|
||||
btnLocalVideo.addEventListener('click', getLocalStream)
|
||||
|
Loading…
Reference in New Issue
Block a user