Commit 8c3b7809 by Lee Munkyeong

Merge branch 'develop' of gitlab.agentec.jp:abookCommunication/chat_webview into…

Merge branch 'develop' of gitlab.agentec.jp:abookCommunication/chat_webview into feature/android6以下の対応

# Conflicts:
#	public_new/js/share.js
parents 37760b25 695e99dc
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</footer> </footer>
<!-- フッター --> <!-- フッター -->
<div id="footer_collabo"></div> <div id="footer_collabo"></div>
<div class="pip_indicator none"> <div class="pip_indicator none" onclick="finishPipMode();">
<div style="vertical-align: middle;display: table-cell;">協業中 <div style="vertical-align: middle;display: table-cell;">協業中
</div> </div>
</div> </div>
...@@ -215,6 +215,13 @@ ...@@ -215,6 +215,13 @@
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.startPipMode(); android.startPipMode();
} else { } else {
webkit.messageHandlers.startPipMode.postMessage({});
}
}
function finishPipMode() {
if (CHAT_UTIL.isIOS()) {
webkit.messageHandlers.finishPipMode.postMessage({});
} }
} }
...@@ -225,6 +232,7 @@ ...@@ -225,6 +232,7 @@
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
joinCollaborationType = CHAT_DB.getJoinCollaborationType();
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg(); collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
joinCollaborationType = android.getJoinCollaborationType(); joinCollaborationType = android.getJoinCollaborationType();
......
...@@ -348,7 +348,7 @@ CHAT_DB.getUserInfoList = function(shopMemberId) { ...@@ -348,7 +348,7 @@ CHAT_DB.getUserInfoList = function(shopMemberId) {
CHAT_DB.createContentView = function() { CHAT_DB.createContentView = function() {
// Androidは実装不要 // Androidは実装不要
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
return callNativeApp("createContentView", {}); return parseInt(callNativeApp("createContentView", {}));
} }
}; };
...@@ -358,3 +358,10 @@ CHAT_DB.getToMoveGroupId = function() { ...@@ -358,3 +358,10 @@ CHAT_DB.getToMoveGroupId = function() {
return callNativeApp("getToMoveGroupId", {}); return callNativeApp("getToMoveGroupId", {});
} }
}; };
CHAT_DB.getJoinCollaborationType = function() {
// Androidは実装不要
if (CHAT_UTIL.isIOS()) {
return parseInt(callNativeApp("getJoinCollaborationType", {}), 10);
}
};
...@@ -124,12 +124,13 @@ $(function () { ...@@ -124,12 +124,13 @@ $(function () {
if (data.type ==="CHANGE_COLLABORATION") { if (data.type ==="CHANGE_COLLABORATION") {
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室退場処理 webkit.messageHandlers.exitMeetingRoom.postMessage({});
} 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) {
if (CHAT_UTIL.isAndroid() && data.payload.collaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version')); alert(getLocalizedString('not_support_version'));
joinCollaborationType = COLLABORATION_TYPE.CAMERA; joinCollaborationType = COLLABORATION_TYPE.CAMERA;
} else { } else {
...@@ -140,7 +141,7 @@ $(function () { ...@@ -140,7 +141,7 @@ $(function () {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO JoinCollaborationAPI //TODO JoinCollaborationAPI
//TODO 文書協業の場合、会議室に参加し、PIPモードに入る。 webkit.messageHandlers.joinMeetingRoom.postMessage(data.payload.newMeetingId);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.joinChangedCollaboration(joinCollaborationType, data.payload.newMeetingId); android.joinChangedCollaboration(joinCollaborationType, data.payload.newMeetingId);
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
...@@ -366,13 +367,13 @@ function changeCollaboration(changeCollaborationType) { ...@@ -366,13 +367,13 @@ function changeCollaboration(changeCollaborationType) {
var newMeetingId = 0; var newMeetingId = 0;
if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) { if (joinCollaborationType == COLLABORATION_TYPE.DOCUMENT) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室を退場し、PIPモードを終了する。(ホストであればルーム削除まで) webkit.messageHandlers.exitMeetingRoom.postMessage({});
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom(); android.exitMeetingRoom();
} }
} }
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO Nativeに変換するCollaborationTypeを保存。 webkit.messageHandlers.setJoinCollaborationType.postMessage(changeCollaborationType);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
if (changeCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) { if (changeCollaborationType == COLLABORATION_TYPE.DOCUMENT && androidVersion < ANDROID_SDK_VERSION.O) {
alert(getLocalizedString('not_support_version')); alert(getLocalizedString('not_support_version'));
...@@ -395,7 +396,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -395,7 +396,7 @@ function changeCollaboration(changeCollaborationType) {
case COLLABORATION_TYPE.DOCUMENT: case COLLABORATION_TYPE.DOCUMENT:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室を開設し、IDを保存 newMeetingId = CHAT_DB.createContentView();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
newMeetingId = android.createContentView(); newMeetingId = android.createContentView();
console.log('newMeetingId = ' + newMeetingId); console.log('newMeetingId = ' + newMeetingId);
...@@ -406,7 +407,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -406,7 +407,7 @@ function changeCollaboration(changeCollaborationType) {
break; break;
} }
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 協業変換API呼出 webkit.messageHandlers.changeCollaboration.postMessage({"changeCollaborationType": changeCollaborationType, "meetingId": newMeetingId});
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.changeCollaboration(changeCollaborationType, newMeetingId); android.changeCollaboration(changeCollaborationType, newMeetingId);
} }
......
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