- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
}
if(localStream.channel && typeof localStream.channel.close==='function'){
localStream.channel.close();
}
}
}
If I try to create LocalStream with "{video:{device:'camera',resolution:'vga'},audio:true}", camera will be released after close the IE TAB.But if I try to create LocalStream with "{video:false,audio:true}", camera will not be released. It seems that the code in onbeforeunload useless.
How to release my localStream correctly?
Thanks for your help.
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is how we stop capturing in our sample and no such issue as mentioned by them.
window.onbeforeunload = function(){
if(localStream){
p2p.unpublish(localStream,$('#target-uid').val());
localStream.close();
}
p2p.stop($('#target-uid').val());
}
Are you using SDK-3.0? Also please make sure stream is unpublished and session stopped before unload the page.
Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page