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 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=0">
<title>LiveTaskyell</title>
<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/common.css">
<link rel="stylesheet" href="./css/chat.css">
......@@ -21,7 +21,7 @@
<!-- ナビメニュー -->
<nav>
<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_prev">
<a href="chat_room.html"><span>ルーム</span></a>
......@@ -66,18 +66,19 @@
<div id="myGroupListForMakeRoom"></div>
</div>
</div>
</div>
<div class="tab_content" id="tab2_content">
<div class="breadcrumb" id="groupPathAreaForAddUser"></div>
<div class="chat_list">
<!-- 全グループ -->
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center" id="rootGroupArea">
<a href="#" class="w-100" id="rootGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
<img src="icon/icon_prev_top.svg" alt="トップグループに戻る" />
<div class="tab_content" id="tab2_content">
<div class="breadcrumb" id="groupPathAreaForAddUser"></div>
<div class="chat_list">
<!-- 全グループ -->
<ul class="p-0 chat_make_room_list">
<li class="d-flex align-items-center" id="rootGroupArea">
<a href="#" class="w-100" id="rootGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
<img src="icon/icon_prev_top.svg" alt="トップグループに戻る" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
......@@ -87,15 +88,15 @@
</div>
</div>
</div>
</div>
</a>
</li>
<li class="d-flex align-items-center" id="parentGroupArea">
<a href="#" class="w-100" id="parentGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
<img src="icon/icon_prev.svg" alt="上位グループに戻る" />
</a>
</li>
<li class="d-flex align-items-center" id="parentGroupArea">
<a href="#" class="w-100" id="parentGroupBtnForAddUser">
<div class="chat_item d-flex flex-row align-items-center">
<div class="chat_item_l">
<div class="thumbnail-icon">
<img src="icon/icon_prev.svg" alt="上位グループに戻る" />
</div>
</div>
<div class="chat_item_m px-0">
<div class="d-flex flex-column">
......@@ -105,14 +106,14 @@
</div>
</div>
</div>
</a>
</li>
<div id="childGroupListAreaForAddUser"></div>
<div id="userInGroupListForAddUser"></div>
</ul>
</a>
</li>
<div id="childGroupListAreaForAddUser"></div>
<div id="userInGroupListForAddUser"></div>
</ul>
</div>
</div>
</div>
</div>
<div class="chat_make_room">
<ul class="overlay_src_msg" style="padding-inline-start: 20px;">
</ul>
......
......@@ -129,7 +129,7 @@ NativeBridgeDelegate.joinCollaboration = function (
NativeBridgeDelegate.inviteUsers = function (userIDList) {
console.debug("call Native Delegate - inviteUsers");
if (typeof android != "undefined") {
android.inviteUsers(userIDList, false);
android.inviteUsers(userIDList);
} else {
webkit.messageHandlers.inviteUsers.postMessage({
userIdList: userIDList,
......@@ -161,7 +161,7 @@ NativeBridgeDelegate.finishPIPMode = function (needsAndroid = false) {
if (deviceInfo.isiOS()) {
webkit.messageHandlers.finishPipMode.postMessage({});
} else if (needsAndroid && typeof android != "undefined") {
android.finishPip();
android.finishPIP();
}
};
......
......@@ -91,6 +91,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
case "API_SEND_OWNER_CHANGE_COMPLETE":
FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data);
CollaborationFeature.updateHost();
break;
case "API_SEND_OWNER_CHANGE_CONFIRM":
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
......@@ -113,6 +114,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
}
CollaborationFeature.updateHost();
break;
case "SWITCH_VIDEO":
CollaborationFeature.updateHost();
CollaborationUI.userListSlideOut();
$(".profile_favorite_btn").click();
default:
break;
}
......
......@@ -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
**************/
......@@ -188,7 +147,6 @@ CoviewBridge.bindMessageEvent = function () {
case "CreateRoomResponse":
if (json.resultCode == 200) {
CollaborationFeature.didReceiveCreateRoomResponseMessage();
CollaborationFeature.checkAndRetryCamera();
}
break;
case "joinRoomInfoResponse":
......@@ -325,6 +283,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
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) {
console.log("peacekim:: CoviewBridge.changeHost userID: " + userID);
// call in agent_app.js
......@@ -608,4 +572,4 @@ CollaborationUI.moveToVideoShareArea = function () {
CollaborationUI.showLoadingIndicator();
$(".coview_share_area").show();
$("#collabo_main").removeClass("none");
};
};
\ No newline at end of file
......@@ -15,7 +15,8 @@
<span>キャンセル</span>
</div>
</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">
<span>引き渡し</span>
</div>
......
......@@ -22,7 +22,8 @@
<button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<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>
</div>
</button>
......@@ -31,14 +32,16 @@
<button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<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>
</div>
</button>
{{/isFavorite}}
{{#isHost}}
<button type="button" class="ch_host_btn border-0 bg_green text_white"
onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');">
<button type="button" class="ch_host_btn border-0 bg_green text_white" data-toggle="modal"
data-target="#changeHostModal" value="#profileModal2" data-collaborationId='{{collaborationId}}'>
<!-- onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> -->
<div class="d-flex flex-column">
<div class="img_wrap">
<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