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 () { ...@@ -380,13 +380,32 @@ document.addEventListener("DOMContentLoaded", function () {
}); });
coview_api.addEventListener("allbye", function () { coview_api.addEventListener("allbye", function () {
console.log("=============> HOST BYE : share hostbye"); requestCollaborationFinish();
alert(getLocalizedString("inform_exit_host_collaboration")); alert(getLocalizedString("inform_exit_host_collaboration"));
var isDocument = false; var isDocument = false;
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
isDocument = true; 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"); $("#loadingIndicator").removeClass("full_active");
}); });
...@@ -396,6 +415,7 @@ document.addEventListener("DOMContentLoaded", function () { ...@@ -396,6 +415,7 @@ document.addEventListener("DOMContentLoaded", function () {
}); });
coview_api.addEventListener("destroy", function () { coview_api.addEventListener("destroy", function () {
requestCollaborationFinish();
console.log("=============> DESTROY : share destroy"); console.log("=============> DESTROY : share destroy");
alert(getLocalizedString("inform_exit_host_collaboration")); alert(getLocalizedString("inform_exit_host_collaboration"));
var isDocument = false; var isDocument = false;
...@@ -434,7 +454,10 @@ document.addEventListener("DOMContentLoaded", function () { ...@@ -434,7 +454,10 @@ document.addEventListener("DOMContentLoaded", function () {
} }
} }
} else if (collaborationJoinFlg == "0") { } 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( coview_api.CreateRoom(
globalUserInfo.roomId, globalUserInfo.roomId,
globalUserInfo.coWorkType globalUserInfo.coWorkType
...@@ -733,6 +756,9 @@ function initCollaborationUI(changeCollaborationType) { ...@@ -733,6 +756,9 @@ function initCollaborationUI(changeCollaborationType) {
function Coview_exitCollaboration(isDocument = false) { function Coview_exitCollaboration(isDocument = false) {
scrollLockOFF(); scrollLockOFF();
if (g_isMainMan) {
requestCollaborationFinish();
}
if (isDocument) { if (isDocument) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.exitMeetingRoom.postMessage({}); webkit.messageHandlers.exitMeetingRoom.postMessage({});
...@@ -740,16 +766,6 @@ function Coview_exitCollaboration(isDocument = false) { ...@@ -740,16 +766,6 @@ function Coview_exitCollaboration(isDocument = false) {
android.exitMeetingRoom(); android.exitMeetingRoom();
} }
} }
if (socket != null && socket.connected) {
socket.emit(
"createMessage",
{
text: DATA_MESSAGE_SCHEME + FINISH_ALL_COLLABORATION_SIGNAL,
},
0
);
}
if ($("#recordBtn").hasClass("bg_red")) { if ($("#recordBtn").hasClass("bg_red")) {
recordStop(Coview_finishCollaboration); recordStop(Coview_finishCollaboration);
} else { } else {
...@@ -1159,3 +1175,15 @@ function delete_dom_obj(id_name) { ...@@ -1159,3 +1175,15 @@ function delete_dom_obj(id_name) {
var dom_obj_parent = dom_obj.parentNode; var dom_obj_parent = dom_obj.parentNode;
dom_obj_parent.removeChild(dom_obj); 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