Commit 63be3aff by Lee Munkyeong

Merge branch 'feature/43211' into 'develop'

43211対応

See merge request !184
parents ed707c97 460c4af1
......@@ -380,13 +380,32 @@ document.addEventListener("DOMContentLoaded", function () {
});
coview_api.addEventListener("allbye", function () {
console.log("=============> HOST BYE : share hostbye");
requestCollaborationFinish();
alert(getLocalizedString("inform_exit_host_collaboration"));
var isDocument = false;
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
isDocument = true;
}
Coview_exitCollaboration(isDocument);
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.exitMeetingRoom.postMessage({});
} else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom();
}
}
if (isInvited == InvitedFlag.NONE) {
CHAT_UI.joinRoom(
CHAT.globalLoginParameter.roomId,
CHAT.globalLoginParameter.name
);
} else {
if (typeof android != "undefined") {
android.openCommunicationHome();
} else {
webkit.messageHandlers.openCommunicationHome.postMessage({});
}
}
console.log("=============> HOST BYE : share hostbye");
$("#loadingIndicator").removeClass("full_active");
});
......@@ -396,6 +415,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
coview_api.addEventListener("destroy", function () {
requestCollaborationFinish();
console.log("=============> DESTROY : share destroy");
alert(getLocalizedString("inform_exit_host_collaboration"));
var isDocument = false;
......@@ -434,7 +454,10 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
} else if (collaborationJoinFlg == "0") {
coview_api.deleteRoom(globalUserInfo.roomId);
let deleteRoomResult = JSON.parse(await deleteRoomApi(globalUserInfo.roomId));
if (deleteRoomResult.resultCode == 200) {
await new Promise(done => setTimeout(() => done(), 3000));
}
coview_api.CreateRoom(
globalUserInfo.roomId,
globalUserInfo.coWorkType
......@@ -733,6 +756,9 @@ function initCollaborationUI(changeCollaborationType) {
function Coview_exitCollaboration(isDocument = false) {
scrollLockOFF();
if (g_isMainMan) {
requestCollaborationFinish();
}
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.exitMeetingRoom.postMessage({});
......@@ -740,16 +766,6 @@ function Coview_exitCollaboration(isDocument = false) {
android.exitMeetingRoom();
}
}
if (socket != null && socket.connected) {
socket.emit(
"createMessage",
{
text: DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL,
},
0
);
}
if ($("#recordBtn").hasClass("bg_red")) {
recordStop(Coview_finishCollaboration);
} else {
......@@ -1159,3 +1175,15 @@ function delete_dom_obj(id_name) {
var dom_obj_parent = dom_obj.parentNode;
dom_obj_parent.removeChild(dom_obj);
}
function requestCollaborationFinish() {
if (socket != null && socket.connected) {
socket.emit(
"createMessage",
{
text: DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL,
},
0
);
}
}
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