Commit 37760b25 by Lee Munkyeong

Android7以下のユーザにホスト権限を渡すときにアラート追加。

parent bfa1639b
......@@ -3,7 +3,7 @@
<div class="overlay_menu h-100 d-flex justify-content-center align-items-center">
<div class="menu_wrap">
<div class="menu d-flex flex-row flex-wrap">
<div class="item collaboration_contents picture_contents video_contents document_contents board_contents">
<div class="item collaboration_contents picture_contents document_contents board_contents video_contents">
<a href="javascript:changeCollaboration(COLLABORATION_TYPE.AUDIO);"
class="d-flex flex-column align-items-center">
<div class="img_wrap">
......
......@@ -900,7 +900,6 @@ CHAT_UI.waitForLoadingVideo = function(div, callback) {
CHAT_UI.waitForLoadingImage = function(div, callback) {
var imgs = div.find("img");
console.log(imgs);
var count = imgs.length;
if (count==0)
callback();
......@@ -908,7 +907,6 @@ CHAT_UI.waitForLoadingImage = function(div, callback) {
imgs.one( "load" , function( e ) {
// イメージが読み込まれた
loaded++;
console.log('++');
if ( loaded === count ) {
callback();
}
......@@ -2490,13 +2488,13 @@ CHAT_UI.joinCollaboration = function(collaborationType, meetingId = 0) {
}
CHAT_UI.startCollaboration = function(collaborationType) {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.startCollaboration.postMessage(collaborationType);
} else if (CHAT_UTIL.isAndroid()) {
if (collaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
return;
}
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.startCollaboration.postMessage(collaborationType);
} else if (CHAT_UTIL.isAndroid()) {
android.startCollaboration(collaborationType);
}
}
......
......@@ -96,5 +96,6 @@ $.lang.en = {
"inform_exit_host_collaboration" : "The host has terminated the collaboration.",
"request_capture" : " request Screen capture.(if you confirm this request, capture the screen and change the host)",
"host_change_notify" : "host changed to %@",
"not_support_version" : "did not support this device version."
"not_support_version" : "did not support this device version.",
"err_target_android_version_not_support" : "did not support document collaboration on this user's device version."
}
......@@ -96,5 +96,6 @@ $.lang.ja = {
"inform_exit_host_collaboration" : "ホストが協業を終了しました。",
"request_capture" : "様がキャプチャーをリクエストしました。(確認時画面をキャプチャーし、ホストを変更します。)",
"host_change_notify" : "ホストが%@様に変更されました。",
"not_support_version" : "現在の端末バージョンでは利用できません。"
"not_support_version" : "現在の端末バージョンでは利用できません。",
"err_target_android_version_not_support" : "対象ユーザの端末バージョンでは文書協業が利用できません。"
}
\ No newline at end of file
......@@ -96,5 +96,6 @@ $.lang.ko = {
"inform_exit_host_collaboration" : "호스트가 협업을 종료하였습니다.",
"request_capture" : "님이 화면캡처를 요청하셨습니다.(확인시 화면을캡처하고 호스트를 변경합니다.)",
"host_change_notify" : "호스트가 %@님으로 변경되었습니다.",
"not_support_version" : "현재단말버전에서는 지원되지않는기능입니다."
"not_support_version" : "현재단말버전에서는 지원되지않는기능입니다.",
"err_target_android_version_not_support" : "해당 유저의 단말버전에서는 문서협업이 이용불가능합니다."
}
......@@ -118,6 +118,7 @@ $(function () {
console.log("=============> READY : ready for coview api");
Coview_addLoginId(globalUserInfo.loginId);
coview_api.Login(globalUserInfo.loginId);
initCollaborationUI(joinCollaborationType)
fw.socket.on('message', async function(data) {
console.log('====> message::data: ', data);
if (data.type ==="CHANGE_COLLABORATION") {
......@@ -130,18 +131,19 @@ $(function () {
}
if (data.payload.collaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
android.openCommunicationHome();
}
joinMeetingId = data.payload.newMeetingId;
initCollaborationUI(data.payload.collaborationType);
joinCollaborationType = COLLABORATION_TYPE.CAMERA;
} else {
joinCollaborationType = data.payload.collaborationType;
}
joinMeetingId = data.payload.newMeetingId;
initCollaborationUI(joinCollaborationType);
if (CHAT_UTIL.isIOS()) {
//TODO JoinCollaborationAPI
//TODO 文書協業の場合、会議室に参加し、PIPモードに入る。
} else if (CHAT_UTIL.isAndroid()) {
android.joinChangedCollaboration(data.payload.collaborationType, data.payload.newMeetingId);
if (data.payload.collaborationType == COLLABORATION_TYPE.DOCUMENT) {
android.joinChangedCollaboration(joinCollaborationType, data.payload.newMeetingId);
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
android.joinMeetingRoom(data.payload.newMeetingId);
}
}
......@@ -160,6 +162,18 @@ $(function () {
if (confirm(data.payload.name + getLocalizedString("request_capture"))) {
captureAndShareImage(CMS_SERVER_URL + '/chatapi/file/uploadArchive', data.payload.name);
}
} else if (data.type === "HOST_CHANGE_REQUEST") {
if (data.payload.loginId == CHAT.globalLoginParameter.loginId) {
fw.sendToMsg('others', 'HOST_CHANGE_RESPONSE', {"isAndroid": CHAT_UTIL.isAndroid(), "isAble" : androidVersion >= ANDROID_SDK_VERSION.O, "loginId": CHAT.globalLoginParameter.loginId});
}
} else if (data.type === "HOST_CHANGE_RESPONSE") {
var isAndroid = data.payload.isAndroid;
var isAble = data.payload.isAble
if (g_isMainMan && isAndroid && !isAble && joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
alert(getLocalizedString('err_target_android_version_not_support'));
} else {
Coview_changeHost(data.payload.loginId);
}
}
});
});
......@@ -568,6 +582,10 @@ function hostSearchInterval() {
timeInterval = setInterval(hostSearch, 2000);
}
function hostChangeRequest(loginId) {
fw.sendToMsg('others', 'HOST_CHANGE_REQUEST', {"loginId": loginId});
}
function captureAndShareImage(urls, changeHostName) {
addCaptureEffect();
$(this).removeClass("on");
......
......@@ -38,7 +38,7 @@
</button>
{{/isFavorite}}
{{#isHost}}
<button type="button" class="ch_host_btn border-0 bg_green text_white" onclick="Coview_changeHost('{{loginId}}');" >
<button type="button" class="ch_host_btn border-0 bg_green text_white" onclick="hostChangeRequest('{{loginId}}');" >
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
......@@ -48,7 +48,7 @@
</button>
{{/isHost}}
{{^isHost}}
<button type="button" class="ch_host_btn border-0 bg_grey text_white" onclick="Coview_changeHost('{{loginId}}');" disabled>
<button type="button" class="ch_host_btn border-0 bg_grey text_white" onclick="hostChangeRequest('{{loginId}}');" disabled>
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
......
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