Commit f1563ade by Kim Peace

fixed show host mark and request s

parent 850dcd11
......@@ -46,10 +46,10 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) {
// GET_COLLABORATION_TYPE_RESPONSE
FermiWebSocketBridge.getCollaborationTypeResponse = function (loginID) {
if (typeof meetingID == undefined ) {
if (typeof meetingID == undefined) {
var meetingID = 0;
}
fw.sendToMsg("others", "GET_COLLABORATION_TYPE_RESPONSE", {
loginId: loginID,
collaborationType: globalUserInfo.collaborationType,
......@@ -90,3 +90,7 @@ FermiWebSocketBridge.changeHostApply = function () {
hostId: globalUserInfo.loginId,
});
};
FermiWebSocketBridge.hostUpdated = function () {
fw.sendToMsg("others", "HOST_UPDATED", {});
};
......@@ -71,7 +71,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
case "API_SEND_OWNER_CHANGE_COMPLETE":
FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data);
CollaborationFeature.updateHost();
FermiWebSocketBridge.hostUpdated();
break;
case "API_SEND_OWNER_CHANGE_CONFIRM":
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
......@@ -98,6 +98,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
CollaborationFeature.updateHost();
CollaborationUI.userListSlideOut();
$(".profile_favorite_btn").click();
break;
case "HOST_UPDATED":
CollaborationFeature.updateHost();
break;
default:
break;
}
......@@ -273,7 +277,8 @@ FermiWebSocketMessageHandler.getCollaborationType = function (data) {
// GET_COLLABORATION_TYPE_RESPONSE
FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
const collaborationType = data.payload.collaborationType;
const meetingID = data.payload.newMeetingId;
const meetingID = data.payload.newMeetingId ?? 0;
FermiWebSocketMessageHandler.updateJoinChangeCollaboration(collaborationType);
globalUserInfo.meetingID = meetingID;
CollaborationUI.updateScreen(globalUserInfo.collaborationType);
......
......@@ -235,7 +235,7 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
};
CoviewBridge.changeHostFromModal = function () {
const userID = $("#changeHostModal").data("bs.modal")._config.collaborationid
const userID = $("#changeHostModal").data("bs.modal")._config.collaborationid;
// call in agent_app.js
coview_api.HostChange(userID);
};
......@@ -301,10 +301,16 @@ CollaborationUI.hideHostButtons = function () {
CollaborationUI.showHostMark = function (hostName) {
// remove all host mark
attendingUsers.forEach(function (userName) {
// hide other user's video area
$(userName).hide();
// remove host mark
const user = "#collaboration_user_" + getReplacedLoginId(userName);
$(user).removeClass("host");
});
// show host video area
$(hostName).show();
// set host name as current user if host name is not set
if (hostName == "") {
hostName = getReplacedLoginId(globalUserInfo.loginId);
......@@ -494,4 +500,4 @@ CollaborationUI.moveToVideoShareArea = function () {
CollaborationUI.showLoadingIndicator();
$(".coview_share_area").show();
$("#collabo_main").removeClass("none");
};
\ No newline at end of file
};
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