Commit 6a8069c8 by Kim Peace

Merge branch 'feature/host_change' into debug/console_logs

# Conflicts:
#	public_new/js/views/collaboration/share-event-listener.js
parents 3ed4b701 850dcd11
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0"> content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title> <title>LiveTaskyell</title>
<link rel="stylesheet" href="./css/notosansjp.css"> <link rel="stylesheet" href="./css/notosansjp.css">
<link rel="stylesheet" href="./fontawesome/css/all.css" > <link rel="stylesheet" href="./fontawesome/css/all.css">
<link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/common.css"> <link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/chat.css"> <link rel="stylesheet" href="./css/chat.css">
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- ナビメニュー --> <!-- ナビメニュー -->
<nav> <nav>
<div class="row h-100 align-items-center"> <div class="row h-100 align-items-center">
<div class="col-4 pr-0"> <div class="col-10 pr-0">
<div class="nav-item"> <div class="nav-item">
<div class="nav_prev"> <div class="nav_prev">
<a href="chat_room.html"><span>ルーム</span></a> <a href="chat_room.html"><span>ルーム</span></a>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<div id="myGroupListForMakeRoom"></div> <div id="myGroupListForMakeRoom"></div>
</div> </div>
</div> </div>
</div>
<div class="tab_content" id="tab2_content"> <div class="tab_content" id="tab2_content">
<div class="breadcrumb" id="groupPathAreaForAddUser"></div> <div class="breadcrumb" id="groupPathAreaForAddUser"></div>
<div class="chat_list"> <div class="chat_list">
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<div class="thumbnail-icon"> <div class="thumbnail-icon">
<img src="icon/icon_prev_top.svg" alt="トップグループに戻る" /> <img src="icon/icon_prev_top.svg" alt="トップグループに戻る" />
</div> </div>
</div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="chat_item_t"> <div class="chat_item_t">
...@@ -87,7 +88,6 @@ ...@@ -87,7 +88,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</a> </a>
</li> </li>
<li class="d-flex align-items-center" id="parentGroupArea"> <li class="d-flex align-items-center" id="parentGroupArea">
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
<div class="thumbnail-icon"> <div class="thumbnail-icon">
<img src="icon/icon_prev.svg" alt="上位グループに戻る" /> <img src="icon/icon_prev.svg" alt="上位グループに戻る" />
</div> </div>
</div>
<div class="chat_item_m px-0"> <div class="chat_item_m px-0">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="chat_item_t"> <div class="chat_item_t">
......
...@@ -129,7 +129,7 @@ NativeBridgeDelegate.joinCollaboration = function ( ...@@ -129,7 +129,7 @@ NativeBridgeDelegate.joinCollaboration = function (
NativeBridgeDelegate.inviteUsers = function (userIDList) { NativeBridgeDelegate.inviteUsers = function (userIDList) {
console.debug("call Native Delegate - inviteUsers"); console.debug("call Native Delegate - inviteUsers");
if (typeof android != "undefined") { if (typeof android != "undefined") {
android.inviteUsers(userIDList, false); android.inviteUsers(userIDList);
} else { } else {
webkit.messageHandlers.inviteUsers.postMessage({ webkit.messageHandlers.inviteUsers.postMessage({
userIdList: userIDList, userIdList: userIDList,
...@@ -161,7 +161,7 @@ NativeBridgeDelegate.finishPIPMode = function (needsAndroid = false) { ...@@ -161,7 +161,7 @@ NativeBridgeDelegate.finishPIPMode = function (needsAndroid = false) {
if (deviceInfo.isiOS()) { if (deviceInfo.isiOS()) {
webkit.messageHandlers.finishPipMode.postMessage({}); webkit.messageHandlers.finishPipMode.postMessage({});
} else if (needsAndroid && typeof android != "undefined") { } else if (needsAndroid && typeof android != "undefined") {
android.finishPip(); android.finishPIP();
} }
}; };
......
...@@ -91,6 +91,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) { ...@@ -91,6 +91,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
case "API_SEND_OWNER_CHANGE_COMPLETE": case "API_SEND_OWNER_CHANGE_COMPLETE":
FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data); FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data);
CollaborationFeature.updateHost(); CollaborationFeature.updateHost();
break; break;
case "API_SEND_OWNER_CHANGE_CONFIRM": case "API_SEND_OWNER_CHANGE_CONFIRM":
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) { if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
...@@ -113,6 +114,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) { ...@@ -113,6 +114,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
} }
CollaborationFeature.updateHost(); CollaborationFeature.updateHost();
break; break;
case "SWITCH_VIDEO":
CollaborationFeature.updateHost();
CollaborationUI.userListSlideOut();
$(".profile_favorite_btn").click();
default: default:
break; break;
} }
......
...@@ -44,47 +44,6 @@ CoviewBridge.bindStartEvent = function () { ...@@ -44,47 +44,6 @@ CoviewBridge.bindStartEvent = function () {
}); });
}; };
CollaborationFeature.checkAndRetryCamera = async function () {
console.log(
"peacekim:: CollaborationFeature.checkAndRetryCamera deviceInfo.isAndroid: " +
deviceInfo.isAndroid() +
", globalUserInfo.collaborationType: " +
globalUserInfo.collaborationType +
", COLLABORATION_TYPE.VIDEO: " +
COLLABORATION_TYPE.VIDEO +
", g_newStream: " +
g_newStream
);
if (!deviceInfo.isAndroid()) {
return;
}
if (globalUserInfo.collaborationType != COLLABORATION_TYPE.VIDEO) {
return;
}
if (g_newStream != null) {
return;
}
console.log(
"peacekim:: CollaborationFeature.checkAndRetryCamera retry camerastream"
);
try {
const cameraStream = await navigator.mediaDevices.getUserMedia(
options.constraints
);
if (cameraStream != null && options.isMainMan) {
ORGcreateLocalVideo(options.constraints);
} else {
setTimeout(() => {
CollaborationFeature.checkAndRetryCamera();
}, 1000);
}
} catch (error) {
setTimeout(() => {
CollaborationFeature.checkAndRetryCamera();
}, 1000);
}
};
/************** /**************
* Scroll Lock * Scroll Lock
**************/ **************/
...@@ -188,7 +147,6 @@ CoviewBridge.bindMessageEvent = function () { ...@@ -188,7 +147,6 @@ CoviewBridge.bindMessageEvent = function () {
case "CreateRoomResponse": case "CreateRoomResponse":
if (json.resultCode == 200) { if (json.resultCode == 200) {
CollaborationFeature.didReceiveCreateRoomResponseMessage(); CollaborationFeature.didReceiveCreateRoomResponseMessage();
CollaborationFeature.checkAndRetryCamera();
} }
break; break;
case "joinRoomInfoResponse": case "joinRoomInfoResponse":
...@@ -325,6 +283,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () { ...@@ -325,6 +283,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName); NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName);
}; };
CoviewBridge.changeHostFromModal = function () {
const userID = $("#changeHostModal").data("bs.modal")._config.collaborationid
// call in agent_app.js
coview_api.HostChange(userID);
};
CoviewBridge.changeHost = function (userID) { CoviewBridge.changeHost = function (userID) {
console.log("peacekim:: CoviewBridge.changeHost userID: " + userID); console.log("peacekim:: CoviewBridge.changeHost userID: " + userID);
// call in agent_app.js // call in agent_app.js
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<span>キャンセル</span> <span>キャンセル</span>
</div> </div>
</button> </button>
<button type="button" onclick="CoviewBridge.changeHost({{shopMemberId}});" class="profile_chat_btn border-0 bg_blue text_white"> <button type="button" onclick="CoviewBridge.changeHostFromModal();"
class="profile_chat_btn border-0 bg_blue text_white">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span>引き渡し</span> <span>引き渡し</span>
</div> </div>
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton"> onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span> <span class="star active shopmember_{{shopMemberId}}"
onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り解除</span> <span>お気に入り解除</span>
</div> </div>
</button> </button>
...@@ -31,14 +32,16 @@ ...@@ -31,14 +32,16 @@
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton"> onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span> <span class="star disable shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り登録</span> <span>お気に入り登録</span>
</div> </div>
</button> </button>
{{/isFavorite}} {{/isFavorite}}
{{#isHost}} {{#isHost}}
<button type="button" class="ch_host_btn border-0 bg_green text_white" <button type="button" class="ch_host_btn border-0 bg_green text_white" data-toggle="modal"
onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> data-target="#changeHostModal" value="#profileModal2" data-collaborationId='{{collaborationId}}'>
<!-- onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> -->
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_change_host.svg" alt="ホスト変更"> <img src="icon/icon_change_host.svg" 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