Commit bf51035b by Lee Munkyeong

アンドロイド8以下バージョンでのアラート追加、キャプチャー機能修正

parent 1a3ed19e
...@@ -102,30 +102,30 @@ ...@@ -102,30 +102,30 @@
<div class="footer_content_b"> <div class="footer_content_b">
<div class="d-flex flex-row justify-content-around h-100"> <div class="d-flex flex-row justify-content-around h-100">
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(collaborationType.AUDIO);"> <a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.AUDIO);">
<img src="icon/icon_phone.png" alt="通話アイコン"> <img src="icon/icon_phone.png" alt="通話アイコン">
<p>通話</p> <p>通話</p>
</a> </a>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<img src="icon/icon_paste.png" alt="文書アイコン" onclick="CHAT_UI.startCollaboration(collaborationType.DOCUMENT);"> <img src="icon/icon_paste.png" alt="文書アイコン" onclick="CHAT_UI.startCollaboration(COLLABORATION_TYPE.DOCUMENT);">
<p>文書</p> <p>文書</p>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(collaborationType.CAMERA);"> <a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.CAMERA);">
<img src="icon/icon_photo.png" alt="画像アイコン"> <img src="icon/icon_photo.png" alt="画像アイコン">
<p>画像</p> <p>画像</p>
</a> </a>
</div> </div>
<div class="footer_item"> <div class="footer_item">
<a href="javascript:CHAT_UI.startCollaboration(collaborationType.VIDEO);"> <a href="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.VIDEO);">
<img src="icon/icon_movie.png" alt="動画アイコン"> <img src="icon/icon_movie.png" alt="動画アイコン">
<p>動画</p> <p>動画</p>
</a> </a>
</div> </div>
<!--リリース後開発予定--> <!--リリース後開発予定-->
<div class="footer_item"> <div class="footer_item">
<img src="icon/icon_whiteboard_gray.png" alt="ホワイトボードアイコン" onclick="javascript:CHAT_UI.startCollaboration(collaborationType.BOARD);"> <img src="icon/icon_whiteboard_gray.png" alt="ホワイトボードアイコン" onclick="javascript:CHAT_UI.startCollaboration(COLLABORATION_TYPE.BOARD);">
<p>ボード</p> <p>ボード</p>
</div> </div>
</div> </div>
...@@ -174,6 +174,7 @@ ...@@ -174,6 +174,7 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
let androidVersion = 0;
$("#pictureModal").load("./modal_chat_picture.html"); $("#pictureModal").load("./modal_chat_picture.html");
$("#chatMenuModal").load("./modal_chat_menu.html"); $("#chatMenuModal").load("./modal_chat_menu.html");
$("#loadingArea").load("./loading.html"); $("#loadingArea").load("./loading.html");
...@@ -182,6 +183,7 @@ ...@@ -182,6 +183,7 @@
android.getLoginParameter(); android.getLoginParameter();
android.getGlobalParameter(); android.getGlobalParameter();
android.saveSelectedUserList(""); android.saveSelectedUserList("");
androidVersion = android.getAndroidVersion();
} else { } else {
webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({}); webkit.messageHandlers.loginInfoRequestMessageHandlerId.postMessage({});
webkit.messageHandlers.getGlobalParameter.postMessage({}); webkit.messageHandlers.getGlobalParameter.postMessage({});
......
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
let roomType; let roomType;
let joinCollaborationType = 0; let joinCollaborationType = 0;
let joinMeetingId = 0; let joinMeetingId = 0;
let androidVersion = 0;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
...@@ -228,7 +229,13 @@ ...@@ -228,7 +229,13 @@
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
joinCollaborationType = android.getJoinCollaborationType(); joinCollaborationType = android.getJoinCollaborationType();
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
androidVersion = android.getAndroidVersion();
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
android.openCommunicationHome();
} }
}
initCollaborationUI(joinCollaborationType); initCollaborationUI(joinCollaborationType);
globalUserInfo.coWorkType = CHAT_UTIL.getCoviewTypeFromCollaborationType(joinCollaborationType); globalUserInfo.coWorkType = CHAT_UTIL.getCoviewTypeFromCollaborationType(joinCollaborationType);
if (collaborationJoinFlg != '2') { if (collaborationJoinFlg != '2') {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="menu_wrap"> <div class="menu_wrap">
<div class="menu d-flex flex-row flex-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 video_contents document_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.AUDIO);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.AUDIO);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_headset.png" alt="音声共有"> <img src="icon/icon_collabo_headset.png" alt="音声共有">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents picture_contents voice_contents document_contents board_contents"> <div class="item collaboration_contents picture_contents voice_contents document_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.VIDEO);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.VIDEO);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有"> <img src="icon/icon_collabo_videocam.png" alt="動画共有">
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents video_contents voice_contents document_contents board_contents"> <div class="item collaboration_contents video_contents voice_contents document_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.CAMERA);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.CAMERA);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_picture.png" alt="写真共有"> <img src="icon/icon_collabo_picture.png" alt="写真共有">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents video_contents voice_contents picture_contents board_contents"> <div class="item collaboration_contents video_contents voice_contents picture_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.DOCUMENT);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.DOCUMENT);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有"> <img src="icon/icon_collabo_document.png" alt="文書共有">
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents video_contents voice_contents picture_contents document_contents"> <div class="item collaboration_contents video_contents voice_contents picture_contents document_contents">
<a href="javascript:changeCollaboration(collaborationType.BOARD);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.BOARD);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き"> <img src="icon/icon_collabo_whiteboard.png" alt="落書き">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="menu_wrap"> <div class="menu_wrap">
<div class="menu d-flex flex-row flex-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 video_contents document_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.AUDIO);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.AUDIO);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_headset.png" alt="音声共有"> <img src="icon/icon_collabo_headset.png" alt="音声共有">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents picture_contents voice_contents document_contents board_contents"> <div class="item collaboration_contents picture_contents voice_contents document_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.VIDEO);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.VIDEO);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_videocam.png" alt="動画共有"> <img src="icon/icon_collabo_videocam.png" alt="動画共有">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents video_contents voice_contents picture_contents board_contents"> <div class="item collaboration_contents video_contents voice_contents picture_contents board_contents">
<a href="javascript:changeCollaboration(collaborationType.DOCUMENT);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.DOCUMENT);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_document.png" alt="文書共有"> <img src="icon/icon_collabo_document.png" alt="文書共有">
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</a> </a>
</div> </div>
<div class="item collaboration_contents video_contents voice_contents picture_contents document_contents"> <div class="item collaboration_contents video_contents voice_contents picture_contents document_contents">
<a href="javascript:changeCollaboration(collaborationType.BOARD);" <a href="javascript:changeCollaboration(COLLABORATION_TYPE.BOARD);"
class="d-flex flex-column align-items-center"> class="d-flex flex-column align-items-center">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_collabo_whiteboard.png" alt="落書き"> <img src="icon/icon_collabo_whiteboard.png" alt="落書き">
......
...@@ -1662,7 +1662,7 @@ CHAT_UI.startVoice = function(userShopMemberId, userName) { ...@@ -1662,7 +1662,7 @@ CHAT_UI.startVoice = function(userShopMemberId, userName) {
} else { } else {
webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD, "isVoice": true}); webkit.messageHandlers.createChatRoom.postMessage({"roomType": "1", "userIdList": userIdList.join(','), "roomName": newRoomName, "screenFlg": makeRoomFlg.NAME_CARD, "isVoice": true});
} }
CHAT_UI.startCollaboration(collaborationType.AUDIO); CHAT_UI.startCollaboration(COLLABORATION_TYPE.AUDIO);
} }
CHAT_UI.makeNameCard = function(shopMemberId) { CHAT_UI.makeNameCard = function(shopMemberId) {
...@@ -2481,11 +2481,19 @@ CHAT_UI.joinCollaboration = function(collaborationType, meetingId = 0) { ...@@ -2481,11 +2481,19 @@ CHAT_UI.joinCollaboration = function(collaborationType, meetingId = 0) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.joinCollaboration.postMessage({"collaborationType": collaborationType, "meetingId": meetingId}); webkit.messageHandlers.joinCollaboration.postMessage({"collaborationType": collaborationType, "meetingId": meetingId});
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
if (collaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
return;
}
android.joinCollaboration(collaborationType, meetingId); android.joinCollaboration(collaborationType, meetingId);
} }
} }
CHAT_UI.startCollaboration = function(collaborationType) { CHAT_UI.startCollaboration = function(collaborationType) {
if (collaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
return;
}
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.startCollaboration.postMessage(collaborationType); webkit.messageHandlers.startCollaboration.postMessage(collaborationType);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
......
...@@ -120,13 +120,13 @@ function updateDuration() { ...@@ -120,13 +120,13 @@ function updateDuration() {
CHAT_UTIL.getCollaborationType = function(key) { CHAT_UTIL.getCollaborationType = function(key) {
switch(key) { switch(key) {
case collaborationTypeKey.AUDIO: case collaborationTypeKey.AUDIO:
return collaborationType.AUDIO; return COLLABORATION_TYPE.AUDIO;
case collaborationTypeKey.CAMERA: case collaborationTypeKey.CAMERA:
return collaborationType.CAMERA; return COLLABORATION_TYPE.CAMERA;
case collaborationTypeKey.VIDEO: case collaborationTypeKey.VIDEO:
return collaborationType.VIDEO; return COLLABORATION_TYPE.VIDEO;
case collaborationTypeKey.DOCUMENT: case collaborationTypeKey.DOCUMENT:
return collaborationType.DOCUMENT; return COLLABORATION_TYPE.DOCUMENT;
default: default:
return 0; return 0;
} }
...@@ -134,17 +134,17 @@ CHAT_UTIL.getCollaborationType = function(key) { ...@@ -134,17 +134,17 @@ CHAT_UTIL.getCollaborationType = function(key) {
CHAT_UTIL.getCoviewTypeFromCollaborationType = function(joinCollaborationType) { CHAT_UTIL.getCoviewTypeFromCollaborationType = function(joinCollaborationType) {
switch(joinCollaborationType) { switch(joinCollaborationType) {
case collaborationType.AUDIO: case COLLABORATION_TYPE.AUDIO:
console.log(collaborationTypeKey.AUDIO); console.log(collaborationTypeKey.AUDIO);
return collaborationTypeKey.AUDIO; return collaborationTypeKey.AUDIO;
case collaborationType.CAMERA: case COLLABORATION_TYPE.CAMERA:
console.log(collaborationTypeKey.CAMERA); console.log(collaborationTypeKey.CAMERA);
return collaborationTypeKey.CAMERA; return collaborationTypeKey.CAMERA;
case collaborationType.VIDEO: case COLLABORATION_TYPE.VIDEO:
return collaborationTypeKey.VIDEO; return collaborationTypeKey.VIDEO;
case collaborationType.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
return collaborationTypeKey.DOCUMENT; return collaborationTypeKey.DOCUMENT;
case collaborationType.BOARD: case COLLABORATION_TYPE.BOARD:
return collaborationTypeKey.BOARD; return collaborationTypeKey.BOARD;
default: default:
return 0; return 0;
......
...@@ -45,7 +45,7 @@ const collaborationTypeKey = { ...@@ -45,7 +45,7 @@ const collaborationTypeKey = {
BOARD : "board" BOARD : "board"
} }
const collaborationType = { const COLLABORATION_TYPE = {
AUDIO : 0, AUDIO : 0,
CAMERA : 2, CAMERA : 2,
VIDEO : 3, VIDEO : 3,
...@@ -58,5 +58,9 @@ const makeRoomFlg = { ...@@ -58,5 +58,9 @@ const makeRoomFlg = {
MAKE_ROOM : 1 MAKE_ROOM : 1
} }
const ANDROID_SDK_VERSION = {
O : 26
}
const messageSeperator = "<::split>"; const messageSeperator = "<::split>";
const dataMessageScheme = "::NOT_MESSAGE"; const dataMessageScheme = "::NOT_MESSAGE";
...@@ -95,5 +95,6 @@ $.lang.en = { ...@@ -95,5 +95,6 @@ $.lang.en = {
"error_empty_room_name" : "Please input room name.", "error_empty_room_name" : "Please input room name.",
"inform_exit_host_collaboration" : "The host has terminated the collaboration.", "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)", "request_capture" : " request Screen capture.(if you confirm this request, capture the screen and change the host)",
"host_change_notify" : "host changed to %@" "host_change_notify" : "host changed to %@",
"not_support_version" : "did not support this device version."
} }
...@@ -95,5 +95,6 @@ $.lang.ja = { ...@@ -95,5 +95,6 @@ $.lang.ja = {
"error_empty_room_name" : "ルーム名を入力してください。", "error_empty_room_name" : "ルーム名を入力してください。",
"inform_exit_host_collaboration" : "ホストが協業を終了しました。", "inform_exit_host_collaboration" : "ホストが協業を終了しました。",
"request_capture" : "様がキャプチャーをリクエストしました。(確認時画面をキャプチャーし、ホストを変更します。)", "request_capture" : "様がキャプチャーをリクエストしました。(確認時画面をキャプチャーし、ホストを変更します。)",
"host_change_notify" : "ホストが%@様に変更されました。" "host_change_notify" : "ホストが%@様に変更されました。",
"not_support_version" : "現在の端末バージョンでは利用できません。"
} }
\ No newline at end of file
...@@ -95,5 +95,6 @@ $.lang.ko = { ...@@ -95,5 +95,6 @@ $.lang.ko = {
"error_empty_room_name" : "룸명을 입력해주세요.", "error_empty_room_name" : "룸명을 입력해주세요.",
"inform_exit_host_collaboration" : "호스트가 협업을 종료하였습니다.", "inform_exit_host_collaboration" : "호스트가 협업을 종료하였습니다.",
"request_capture" : "님이 화면캡처를 요청하셨습니다.(확인시 화면을캡처하고 호스트를 변경합니다.)", "request_capture" : "님이 화면캡처를 요청하셨습니다.(확인시 화면을캡처하고 호스트를 변경합니다.)",
"host_change_notify" : "호스트가 %@님으로 변경되었습니다." "host_change_notify" : "호스트가 %@님으로 변경되었습니다.",
"not_support_version" : "현재단말버전에서는 지원되지않는기능입니다."
} }
...@@ -121,75 +121,45 @@ $(function () { ...@@ -121,75 +121,45 @@ $(function () {
fw.socket.on('message', async function(data) { fw.socket.on('message', async function(data) {
console.log('====> message::data: ', data); console.log('====> message::data: ', data);
if (data.type ==="CHANGE_COLLABORATION") { if (data.type ==="CHANGE_COLLABORATION") {
if (joinCollaborationType == collaborationType.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室退場処理 //TODO 会議室退場処理
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom(); android.exitMeetingRoom();
} }
} }
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); initCollaborationUI(data.payload.collaborationType);
joinCollaborationType = data.payload.collaborationType joinCollaborationType = data.payload.collaborationType;
if (data.payload.collaborationType == collaborationType.DOCUMENT) { joinMeetingId = data.payload.newMeetingId;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室に参加し、PIPモードに入る。 //TODO JoinCollaborationAPI
//TODO 文書協業の場合、会議室に参加し、PIPモードに入る。
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.joinMeetingRoom(data.payload.newMeetingId); android.joinChangedCollaboration(data.payload.collaborationType, data.payload.newMeetingId);
if (data.payload.collaborationType == COLLABORATION_TYPE.DOCUMENT) {
android.joinMeetingRoom(data.payload.collaborationType, data.payload.newMeetingId);
} }
joinMeetingId = data.payload.newMeetingId;
} }
} else if (data.type ==="SHARE_FILE") { } else if (data.type ==="SHARE_FILE") {
if (joinCollaborationType != collaborationType.CAMERA) { if (joinCollaborationType != COLLABORATION_TYPE.CAMERA) {
initCollaborationUI(collaborationType.CAMERA); initCollaborationUI(COLLABORATION_TYPE.CAMERA);
joinCollaborationType = collaborationType.CAMERA; joinCollaborationType = COLLABORATION_TYPE.CAMERA;
fw.sendToMsg('others', 'SHARE_FILE_HOST', {"collaborationType": collaborationType.CAMERA}); fw.sendToMsg('others', 'SHARE_FILE_HOST', {"collaborationType": COLLABORATION_TYPE.CAMERA});
} }
} else if (data.type ==="SHARE_FILE_HOST") { } else if (data.type ==="SHARE_FILE_HOST") {
if (joinCollaborationType != collaborationType.CAMERA && g_isMainMan) { if (joinCollaborationType != COLLABORATION_TYPE.CAMERA && g_isMainMan) {
initCollaborationUI(collaborationType.CAMERA); initCollaborationUI(COLLABORATION_TYPE.CAMERA);
joinCollaborationType = collaborationType.CAMERA; joinCollaborationType = COLLABORATION_TYPE.CAMERA;
} }
} else if (data.type === "CAPTURE_REQUEST" && g_isMainMan) { } else if (data.type === "CAPTURE_REQUEST" && g_isMainMan) {
if (confirm(data.payload.name + getLocalizedString("request_capture"))) { if (confirm(data.payload.name + getLocalizedString("request_capture"))) {
captureAndShareImage(CMS_SERVER_URL + '/chatapi/file/uploadArchive', data.payload.name); captureAndShareImage(CMS_SERVER_URL + '/chatapi/file/uploadArchive', data.payload.name);
} }
} else if (data.type === "SEND_HOST_CHANGE_SIGNAL") {
if (g_username == data.payload.name) {
fw.sendToMsg('others', 'SEND_HOST_CHANGE_DONE_SIGNAL', {host: g_username});
$(".coview_on_media_image_crown").show();
$(".coview_on_screen_btn.owner").show();
$("#coviewShareMoreButton").show();
$(".coview_share_title_right_area").show();
g_isMainMan = true;
g_isMainManUsername = g_username;
options.constraints = { audio: true, video: true };
g_localStream = await createLocalVideo (options.constraints);
ChangeAgentStream(g_localStream);
$('[id^="video-"]').css('display','none');
SwitchMainVideoPosition("agent");
$("#localVideo").show();
$("#remotes").css("z-index", "0");
alert(getLocalizedString('host_change_notify', data.payload.name));
}
} else if (data.type === "SEND_HOST_CHANGE_DONE_SIGNAL") {
alert(getLocalizedString('host_change_notify', data.payload.host));
$(".coview_on_media_image_crown").hide();
$(".coview_on_screen_btn.owner").hide();
$(".coview_share_title_right_area").hide();
$("#localVideo").hide();
g_isMainMan = false;
g_isMainManUsername = data.payload.host;
var remoteVideoElID = "video-" + g_isMainManUsername;
$('[id^="video-"]').css('display','none');
$("#" + remoteVideoElID).removeAttr( 'style' );
$("#" + remoteVideoElID).css("width", "100%");
$("#" + remoteVideoElID).css("height", "100%");
$("#" + remoteVideoElID).css("position", "absolute");
$("#" + remoteVideoElID).css("bottom", "0px");
$("#" + remoteVideoElID).css("left", "0px");
$("#" + remoteVideoElID).css("display","");
$(".coview_memberList").removeClass("on");
$(".overlay").removeClass("active");
} }
}); });
}); });
...@@ -286,7 +256,7 @@ $(function () { ...@@ -286,7 +256,7 @@ $(function () {
messageSeperator + messageSeperator +
messageType.COMMUNICATIONSTART + messageType.COMMUNICATIONSTART +
messageSeperator + messageSeperator +
collaborationType.BOARD; COLLABORATION_TYPE.BOARD;
} else { } else {
coviewInviteMessage = coviewInviteMessage =
"" + "" +
...@@ -380,7 +350,7 @@ function Coview_moveToVideoShareArea() { ...@@ -380,7 +350,7 @@ function Coview_moveToVideoShareArea() {
function changeCollaboration(changeCollaborationType) { function changeCollaboration(changeCollaborationType) {
var newMeetingId = 0; var newMeetingId = 0;
if (joinCollaborationType == collaborationType.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室を退場し、PIPモードを終了する。(ホストであればルーム削除まで) //TODO 会議室を退場し、PIPモードを終了する。(ホストであればルーム削除まで)
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
...@@ -390,21 +360,25 @@ function changeCollaboration(changeCollaborationType) { ...@@ -390,21 +360,25 @@ function changeCollaboration(changeCollaborationType) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO Nativeに変換するCollaborationTypeを保存。 //TODO Nativeに変換するCollaborationTypeを保存。
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
if (changeCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version'));
return;
}
android.setJoinCollaborationType(changeCollaborationType); android.setJoinCollaborationType(changeCollaborationType);
} }
joinCollaborationType = changeCollaborationType; joinCollaborationType = changeCollaborationType;
initCollaborationUI(changeCollaborationType); initCollaborationUI(changeCollaborationType);
switch (changeCollaborationType) { switch (changeCollaborationType) {
case collaborationType.AUDIO: case COLLABORATION_TYPE.AUDIO:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
break; break;
case collaborationType.CAMERA: case COLLABORATION_TYPE.CAMERA:
coview_api.ChangeCollaboration('image'); coview_api.ChangeCollaboration('image');
break; break;
case collaborationType.VIDEO: case COLLABORATION_TYPE.VIDEO:
coview_api.ChangeCollaboration('video'); coview_api.ChangeCollaboration('video');
break; break;
case collaborationType.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室を開設し、IDを保存 //TODO 会議室を開設し、IDを保存
...@@ -413,7 +387,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -413,7 +387,7 @@ function changeCollaboration(changeCollaborationType) {
console.log('newMeetingId = ' + newMeetingId); console.log('newMeetingId = ' + newMeetingId);
} }
break; break;
case collaborationType.BOARD: case COLLABORATION_TYPE.BOARD:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
break; break;
} }
...@@ -434,7 +408,7 @@ function initCollaborationUI(changeCollaborationType){ ...@@ -434,7 +408,7 @@ function initCollaborationUI(changeCollaborationType){
} }
$("link[href='./css/collaboration_board.css']").remove(); $("link[href='./css/collaboration_board.css']").remove();
switch (changeCollaborationType) { switch (changeCollaborationType) {
case collaborationType.AUDIO: case COLLABORATION_TYPE.AUDIO:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.voice_contents').removeClass('none'); $('.voice_contents').removeClass('none');
var w = $('.user_btn').width(); var w = $('.user_btn').width();
...@@ -450,17 +424,17 @@ function initCollaborationUI(changeCollaborationType){ ...@@ -450,17 +424,17 @@ function initCollaborationUI(changeCollaborationType){
} }
break; break;
case collaborationType.CAMERA: case COLLABORATION_TYPE.CAMERA:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.picture_contents').removeClass('none'); $('.picture_contents').removeClass('none');
break; break;
case collaborationType.VIDEO: case COLLABORATION_TYPE.VIDEO:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.video_contents').removeClass('none'); $('.video_contents').removeClass('none');
break; break;
case collaborationType.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.document_contents').removeClass('none'); $('.document_contents').removeClass('none');
var w = $('.user_btn').width(); var w = $('.user_btn').width();
...@@ -476,7 +450,7 @@ function initCollaborationUI(changeCollaborationType){ ...@@ -476,7 +450,7 @@ function initCollaborationUI(changeCollaborationType){
} }
break; break;
case collaborationType.BOARD: case COLLABORATION_TYPE.BOARD:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.board_contents').removeClass('none'); $('.board_contents').removeClass('none');
$('head').append('<link rel="stylesheet" href="./css/collaboration_board.css">'); $('head').append('<link rel="stylesheet" href="./css/collaboration_board.css">');
...@@ -555,19 +529,19 @@ function hostSearchInterval() { ...@@ -555,19 +529,19 @@ function hostSearchInterval() {
function hostSearch() { function hostSearch() {
if (g_isMainMan) { if (g_isMainMan) {
$('.host_contents').removeClass('none'); $('.host_contents').removeClass('none');
if (joinCollaborationType == collaborationType.CAMERA) { if (joinCollaborationType == COLLABORATION_TYPE.CAMERA) {
$('.photo_select_button').removeClass('none'); $('.photo_select_button').removeClass('none');
} }
if (joinCollaborationType == collaborationType.VIDEO) { if (joinCollaborationType == COLLABORATION_TYPE.VIDEO) {
$('.video_contents_host').removeClass('none'); $('.video_contents_host').removeClass('none');
$('.video_contents_user').addClass('none'); $('.video_contents_user').addClass('none');
} }
} else { } else {
$('.host_contents').addClass('none'); $('.host_contents').addClass('none');
if (joinCollaborationType == collaborationType.CAMERA) { if (joinCollaborationType == COLLABORATION_TYPE.CAMERA) {
$('.photo_select_button').addClass('none'); $('.photo_select_button').addClass('none');
} }
if (joinCollaborationType == collaborationType.VIDEO) { if (joinCollaborationType == COLLABORATION_TYPE.VIDEO) {
$('.video_contents_user').removeClass('none'); $('.video_contents_user').removeClass('none');
$('.video_contents_host').addClass('none'); $('.video_contents_host').addClass('none');
} }
...@@ -665,7 +639,6 @@ function captureAndShareImage(urls, changeHostName) { ...@@ -665,7 +639,6 @@ function captureAndShareImage(urls, changeHostName) {
$(".coview_on_media_btn_back").show(); $(".coview_on_media_btn_back").show();
//アーカイブ保存。 //アーカイブ保存。
ArchiveFileManage(blob,uploadFileName,urls); ArchiveFileManage(blob,uploadFileName,urls);
fw.sendToMsg('others', 'SEND_HOST_CHANGE_SIGNAL', {"name": changeHostName});
}, 1500); }, 1500);
}, },
error: function(err) { error: function(err) {
......
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