Commit f1563ade by Kim Peace

fixed show host mark and request s

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