Commit 8c7e5a08 by Takatoshi Miura

ABCOMM-93_change-collaboration_[iOS] 協業切り替え実装

parent 37d233f8
...@@ -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>
...@@ -214,6 +214,13 @@ ...@@ -214,6 +214,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({});
} }
} }
......
...@@ -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", {}));
} }
}; };
...@@ -362,6 +362,6 @@ CHAT_DB.getToMoveGroupId = function() { ...@@ -362,6 +362,6 @@ CHAT_DB.getToMoveGroupId = function() {
CHAT_DB.getJoinCollaborationType = function() { CHAT_DB.getJoinCollaborationType = function() {
// Androidは実装不要 // Androidは実装不要
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
return callNativeApp("getJoinCollaborationType", {}); return parseInt(callNativeApp("getJoinCollaborationType", {}), 10);
} }
}; };
...@@ -123,7 +123,7 @@ $(function () { ...@@ -123,7 +123,7 @@ $(function () {
if (data.type ==="CHANGE_COLLABORATION") { if (data.type ==="CHANGE_COLLABORATION") {
if (joinCollaborationType == collaborationType.DOCUMENT) { if (joinCollaborationType == collaborationType.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();
} }
...@@ -132,7 +132,7 @@ $(function () { ...@@ -132,7 +132,7 @@ $(function () {
joinCollaborationType = data.payload.collaborationType joinCollaborationType = data.payload.collaborationType
if (data.payload.collaborationType == collaborationType.DOCUMENT) { if (data.payload.collaborationType == collaborationType.DOCUMENT) {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
//TODO 会議室に参加し、PIPモードに入る。 webkit.messageHandlers.joinMeetingRoom.postMessage(data.payload.newMeetingId);
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.joinMeetingRoom(data.payload.newMeetingId); android.joinMeetingRoom(data.payload.newMeetingId);
} }
...@@ -382,7 +382,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -382,7 +382,7 @@ function changeCollaboration(changeCollaborationType) {
var newMeetingId = 0; var newMeetingId = 0;
if (joinCollaborationType == collaborationType.DOCUMENT) { if (joinCollaborationType == collaborationType.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();
} }
...@@ -407,7 +407,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -407,7 +407,7 @@ function changeCollaboration(changeCollaborationType) {
case collaborationType.DOCUMENT: case collaborationType.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);
...@@ -418,7 +418,7 @@ function changeCollaboration(changeCollaborationType) { ...@@ -418,7 +418,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