Commit a1097bef by Lee Munkyeong

Merge branch 'features/release_sp3_collaboration_document' into 'release_sp3'

Features/release sp3 collaboration document

See merge request !115
parents 0b685327 4b957afe
......@@ -16,7 +16,7 @@
</a>
</div>
<div class="footer_item">
<a href="javascript:Coview_exitCollaboration();">
<a href="javascript:Coview_exitCollaboration(isDocument);">
<div class="img_wrap bg_red">
<img src="icon/icon_tell.png" alt="通話">
</div>
......
......@@ -2484,20 +2484,6 @@ CHAT_UI.startCollaboration = function(collaborationType) {
}
}
CHAT_UI.displayDocumentSelectScreen = function() {
var documentList = CHAT_DB.getContentList();
var documentTemplate;
$.get({ url: "./template/template_document_list.html", async: false }
, function(text) {
documentTemplate = text;
});
let html = Mustache.render(documentTemplate, {
documentList: documentList
});
let obj = jQuery.parseHTML(html);
$('#overlay_document_list').append(obj);
$('#overlay_document_list').removeClass('none');
}
CHAT_UI.refreshJoinedCollaboration = function(loginIdList, hostName) {
CHAT_UI.showLoadingIndicator();
......
......@@ -121,15 +121,13 @@ CHAT_UTIL.getCollaborationType = function(key) {
switch(key) {
case collaborationTypeKey.AUDIO:
return collaborationType.AUDIO;
break;
case collaborationTypeKey.CAMERA:
return collaborationType.CAMERA;
break;
case collaborationTypeKey.VIDEO:
return collaborationType.VIDEO;
break;
case collaborationTypeKey.DOCUMENT:
return collaborationType.DOCUMENT;
default:
return 0;
break;
}
}
\ No newline at end of file
......@@ -40,13 +40,15 @@ const nameCardAreaId = {
const collaborationTypeKey = {
AUDIO : "audio",
CAMERA : "camera",
VIDEO : "video"
VIDEO : "video" ,
DOCUMENT : "document"
}
const collaborationType = {
AUDIO : 0,
CAMERA : 2,
VIDEO : 3
VIDEO : 3,
DOCUMENT : 4
}
const makeRoomFlg = {
......
......@@ -2,6 +2,7 @@
/* Functions */
/* --------------------------------------------------- */
let coview_api = new CoviewApi();
var isDocument = false;
let isLeaved = false;
$(function() {
var coviewApiActive = coview_api.Init(
......@@ -158,7 +159,7 @@ $(function() {
$(".coview_share_area").hide();
$("#loadingIndicator").removeClass("full_active");
});
var meetingId;
coview_api.addEventListener ("message", async function (event, json) {
console.log("+++ addEventListener", json);
console.log("processMessage api = ", json.api);
......@@ -169,10 +170,28 @@ $(function() {
console.log('------------------------------');
console.log(globalUserInfo.coWorkType);
console.log(collaborationJoinFlg);
if (globalUserInfo.coWorkType == collaborationTypeKey.DOCUMENT) {
isDocument = true;
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
}
if (collaborationJoinFlg == '1') {
coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
//TODO 画面を縮小し、会議室に入場する処理
} else if (CHAT_UTIL.isAndroid()) {
android.startContentView(meetingId);
}
}
} else if (collaborationJoinFlg == '0') {
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
//TODO 画面を縮小し、会議室に入場する処理
} else if (CHAT_UTIL.isAndroid()) {
meetingId = android.createContentView();
}
}
} else if (collaborationJoinFlg == '2') {
coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
}
......@@ -180,10 +199,16 @@ $(function() {
break;
case "CreateRoomResponse":
if (json.resultCode == 200) {
var coviewInviteMessage = "" + messageSeperator + messageType.COMMUNICATIONSTART + messageSeperator + CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
var coviewInviteMessage;
if (isDocument) {
coviewInviteMessage = "" + messageSeperator + messageType.COMMUNICATIONSTART + messageSeperator + CHAT_UTIL.getCollaborationType(collaborationTypeKey.DOCUMENT) + messageSeperator + meetingId;
} else {
coviewInviteMessage = "" + messageSeperator + messageType.COMMUNICATIONSTART + messageSeperator + CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
}
socket.emit('createMessage', {
text: coviewInviteMessage
}, 0);
} else {
}
break;
......@@ -235,7 +260,14 @@ function Coview_moveToVideoShareArea() {
$('#collabo_main').removeClass('none');
}
function Coview_exitCollaboration() {
function Coview_exitCollaboration(isDocument = false) {
if (isDocument) {
if (CHAT_UTIL.isIOS()) {
//TODO IOS会議室退場処理
} else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom();
}
}
coview_api.LeaveRoom();
isLeaved = true;
if (collaborationJoinFlg != '2') {
......
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