disconnect Twilio video -
hello started video call when disconnect camera led indicator still on. how can disconnect call?
video.createlocalvideotrack().then(track => { var localmediacontainer = document.getelementbyid('preview'); localmediacontainer.appendchild(track.attach()); }); video.connect(response.data, { name: 'room', video: {width: 600} }).then(room => { activeroom = room; }); $('#disconnect').on('click', () => { activeroom.disconnect(); })
twilio developer evangelist here.
to disconnect local user's video , microphone input can stop tracks. so, before leave room, call
activeroom.localparticipant.tracks.foreach(function(track) { track.stop() });
that should force tracks stop , led go off.
just note, led on camera in use. when disconnect room media stops streaming room.
let me know if helps @ all.
Comments
Post a Comment