Commit 36acb182 by Kim Peace

Added some comments

parent 01e4b615
......@@ -164,6 +164,8 @@ CoviewBridge.bindMessageEvent = function () {
CollaborationFeature.didReceiveLoginResponseMessage = async function () {
try {
// check device has camera and mic
// esp, in ios, ask the permission for usermedia in everytime it use.
await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
if (
globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA &&
......@@ -174,6 +176,7 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
}, 100);
}
} catch (err) {
// if the user denied the permission, it goes back to chat room
if (err.name == "NotAllowedError") {
CoviewBridge.exitCollaboration();
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment