Commit be06cf39 by Lee Munkyeong

協業実装

parent 4db50925
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<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="collaboration_voice.html"> <a href="javascript:CHAT_UI.startCollaboration(collaborationType.AUDIO);">
<img src="icon/icon_phone.png" alt="通話アイコン"> <img src="icon/icon_phone.png" alt="通話アイコン">
<p>通話</p> <p>通話</p>
</a> </a>
......
...@@ -189,6 +189,7 @@ ...@@ -189,6 +189,7 @@
let PLATFORM = ''; let PLATFORM = '';
let IS_MOBILE = true; let IS_MOBILE = true;
let IS_ONLINE = false; let IS_ONLINE = false;
let collaborationJoinFlg = 0;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
...@@ -202,6 +203,12 @@ ...@@ -202,6 +203,12 @@
PLATFORM = platform; PLATFORM = platform;
IS_MOBILE = isMobile; IS_MOBILE = isMobile;
IS_ONLINE = isOnline; IS_ONLINE = isOnline;
if (CHAT_UTIL.isIOS()) {
} else if (CHAT_UTIL.isAndroid()) {
collaborationJoinFlg = android.getCollaborationJoinFlg();
console.log(collaborationJoinFlg);
}
globalUserInfo.coWorkType = collaborationTypeKey.CAMERA; globalUserInfo.coWorkType = collaborationTypeKey.CAMERA;
CHAT_SOCKET.connectSocket(); CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function() { socket.emit('join', CHAT.globalLoginParameter, function() {
......
...@@ -675,8 +675,10 @@ input[name="tab_item"] { ...@@ -675,8 +675,10 @@ input[name="tab_item"] {
/* 通話エリア */ /* 通話エリア */
.collabo_area_container { .collabo_area_container {
max-width: 320px; padding-bottom: 20px;
width: 320px;
margin: 0 auto; margin: 0 auto;
display: table;
} }
.collabo_date span { .collabo_date span {
font-size: 12px; font-size: 12px;
......
...@@ -1272,7 +1272,6 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1272,7 +1272,6 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
var collaborationInfo = JSON.parse(message.message); var collaborationInfo = JSON.parse(message.message);
var userInCollaboration = JSON.parse(android.getUserInfoList(collaborationInfo.userList)); var userInCollaboration = JSON.parse(android.getUserInfoList(collaborationInfo.userList));
console.log(messageTime);
userInCollaboration.forEach(function(user) { userInCollaboration.forEach(function(user) {
user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl); user.profileUrl = CHAT.getProfileImgUrl(user.profileUrl);
}) })
...@@ -1280,7 +1279,11 @@ CHAT_UI.loadMessages = function(roomId, roomName) { ...@@ -1280,7 +1279,11 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
roomName: roomName, roomName: roomName,
userCount: userInCollaboration.length, userCount: userInCollaboration.length,
userList: userInCollaboration.length > 3 ? userInCollaboration.slice(0, 3) : userInCollaboration, userList: userInCollaboration.length > 3 ? userInCollaboration.slice(0, 3) : userInCollaboration,
insertDate: message.insertDate insertDate: message.insertDate,
collaborationType: collaborationInfo.collaborationType,
isToday: isToday,
createdAtDay: messageTime.createdAtDay,
createdAtTime: messageTime.createdAtTime
}); });
html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html; html = message.message.includes('attachedImages') || message.message.includes('attachedVideos') ? CHAT_UTIL.htmlDecode(html) : html;
workVal = html + workVal; workVal = html + workVal;
...@@ -2402,4 +2405,20 @@ CHAT_UI.displayExistRoom = function(roomId) { ...@@ -2402,4 +2405,20 @@ CHAT_UI.displayExistRoom = function(roomId) {
android.joinRoom(roomId, ''); android.joinRoom(roomId, '');
} }
return; return;
}
CHAT_UI.joinCollaboration = function(collaborationType) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS
} else if (CHAT_UTIL.isAndroid()) {
android.joinCollaboration(collaborationType);
}
}
CHAT_UI.startCollaboration = function(collaborationType) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS
} else if (CHAT_UTIL.isAndroid()) {
android.startCollaboration(collaborationType);
}
} }
\ No newline at end of file
...@@ -152,7 +152,11 @@ $(function(){ ...@@ -152,7 +152,11 @@ $(function(){
switch (json.api){ switch (json.api){
case "LoginResponse": case "LoginResponse":
if(globalUserInfo.coWorkType = collaborationTypeKey.CAMERA) { if(globalUserInfo.coWorkType = collaborationTypeKey.CAMERA) {
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); if (collaborationJoinFlg == '1') {
coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
} else if (collaborationJoinFlg == '0') {
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
}
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
} }
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
<div class="collabo_area_container"> <div class="collabo_area_container">
<!-- 時刻 --> <!-- 時刻 -->
<div class="collabo_date text-right"> <div class="collabo_date text-right">
<span>12:23 PM</span> {{#isToday}}
<span>{{createdAtTime}}</span>
{{/isToday}}
{{^isToday}}
<span>{{createdAtDay}}</span><span>{{createdAtTime}}</span>
{{/isToday}}
</div> </div>
<div class="collabo_area"> <div class="collabo_area">
<div class="collabo_desc"> <div class="collabo_desc">
...@@ -22,7 +27,7 @@ ...@@ -22,7 +27,7 @@
</div> </div>
</div> </div>
<div class="collabo_btn"> <div class="collabo_btn">
<button type="button" name="button"> <button type="button" name="button" onclick="CHAT_UI.joinCollaboration({{collaborationType}})">
<img src="icon/icon_profile_phone.png" alt="通話"> <img src="icon/icon_profile_phone.png" alt="通話">
<span>参加する</span> <span>参加する</span>
</button> </button>
......
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