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