Commit 4b3813e4 by Kim Peace

Merge branch 'bug/#44048_picture_select_on_picture_collaboration' into debug/console_logs

# Conflicts:
#	public_new/js/common/common.js
parents 09c1a264 e7dfd579
......@@ -153,7 +153,12 @@ Common.getProfileImgUrl = function (path) {
if (receivedString == "" || receivedString == undefined) {
return Common.generateProfileImgURLFromServer(userInfo[0], userInfo[1]);
}
return "data:image/"+userInfo[0].split('.').pop()+";base64," + receivedString;
return (
"data:image/" +
userInfo[0].split(".").pop() +
";base64," +
receivedString
);
}
return Common.generateProfileImgURLFromServer(userInfo[0], userInfo[1]);
} else {
......@@ -196,7 +201,9 @@ Common.startCollaboration = function (collaborationType) {
}
}
if (typeof CHAT_SOCKET != "undefined") {
CHAT_SOCKET.emitCollaborationFinishMessage();
}
NativeBridgeDelegate.finishAllCollaboration();
NativeBridgeDelegate.startCollaboration(collaborationType);
Common.dismissLoadingIndicator();
......
......@@ -112,7 +112,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
if (globalUserInfo.joinType != COLLABORATION_JOIN_TYPE.INVITED) {
FermiWebSocketMessageHandler.apiWelcome();
} else {
FermiWebSocketBridge.getCollaborationType()
FermiWebSocketBridge.getCollaborationType();
}
CollaborationFeature.updateHost();
break;
......@@ -174,6 +174,7 @@ FermiWebSocketMessageHandler.shareFile = function () {
CollaborationUI.updateScreen(COLLABORATION_TYPE.CAMERA);
globalUserInfo.collaborationType = COLLABORATION_TYPE.CAMERA;
FermiWebSocketBridge.shareFileHost(COLLABORATION_TYPE.CAMERA);
CollaborationFeature.updateHost();
};
// SHARE_FILE_HOST
......@@ -181,6 +182,7 @@ FermiWebSocketMessageHandler.shareFileHost = function () {
console.log("peacekim:: FermiWebSocketMessageHandler.shareFileHost");
CollaborationUI.updateScreen(COLLABORATION_TYPE.CAMERA);
globalUserInfo.collaborationType = COLLABORATION_TYPE.CAMERA;
CollaborationFeature.updateHost();
};
// CAPTURE_REQUEST
......
......@@ -197,6 +197,21 @@ CoviewBridge.bindMessageEvent = function () {
};
CollaborationFeature.didReceiveLoginResponseMessage = async function () {
try {
await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
setTimeout(function () {
togglePhotoOpenPlaceHolder();
}, 8000);
}
} catch (err) {
if (err.name == "NotAllowedError") {
CoviewBridge.exitCollaboration();
return;
}
}
const isDocument =
globalUserInfo.collaborationType == COLLABORATION_TYPE.DOCUMENT;
const isAttendee =
......@@ -347,6 +362,9 @@ CollaborationUI.showHostButtons = function () {
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.VIDEO) {
$(".video_contents_host").removeClass("none");
$(".video_contents_user").addClass("none");
} else {
$(".video_contents_host").addClass("none");
$(".video_contents_user").addClass("none");
}
};
......@@ -362,6 +380,9 @@ CollaborationUI.hideHostButtons = function () {
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.VIDEO) {
$(".video_contents_user").removeClass("none");
$(".video_contents_host").addClass("none");
} else {
$(".video_contents_host").addClass("none");
$(".video_contents_user").addClass("none");
}
};
......
......@@ -115,6 +115,8 @@ CollaborationUI.updateScreen = async function (collaborationType) {
);
break;
}
CollaborationFeature.updateHost();
await waitMillisecond(1000);
$(".before_loading_indicator").addClass("none");
};
......
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