Commit 801775ea by Lee Munkyeong

文書協業への変換処理実装中

parent f4715177
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
</div> </div>
<div class="collabo_nav_r"> <div class="collabo_nav_r">
<div class="text-right d-flex align-items-center"> <div class="text-right d-flex align-items-center">
<button type="button" name="button" class="btn user_btn collaboration_contents picture_contents video_contents board_contents document_contents"></button> <button type="button" name="button" class="btn user_btn collaboration_contents picture_contents video_contents board_contents"></button>
<button type="button" name="button" class="btn menu_btn"></button> <button type="button" name="button" class="btn menu_btn host_contents"></button>
<button type="button" name="button" class="btn add_user_btn none"></button> <button type="button" name="button" class="btn add_user_btn none"></button>
<button type="button" name="button" class="btn start_pip_btn collaboration_contents document_contents" onclick="startPipMode();"></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> --> <!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview_exitCollaboration();"></button> -->
</div> </div>
</div> </div>
...@@ -183,6 +184,7 @@ ...@@ -183,6 +184,7 @@
let collaborationJoinFlg = 0; let collaborationJoinFlg = 0;
let roomType; let roomType;
let joinCollaborationType = 0; let joinCollaborationType = 0;
let joinMeetingId = 0;
if (typeof(android) != "undefined") { if (typeof(android) != "undefined") {
android.getLoginParameter(); android.getLoginParameter();
...@@ -215,14 +217,10 @@ ...@@ -215,14 +217,10 @@
collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg(); collaborationJoinFlg = CHAT_DB.getCollaborationJoinFlg();
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
joinCollaborationType = android.getJoinCollaborationType(); joinCollaborationType = android.getJoinCollaborationType();
console.log('----coll type ---');
console.log(joinCollaborationType);
collaborationJoinFlg = android.getCollaborationJoinFlg(); collaborationJoinFlg = android.getCollaborationJoinFlg();
} }
initCollaborationUI(joinCollaborationType); initCollaborationUI(joinCollaborationType);
globalUserInfo.coWorkType = CHAT_UTIL.getCoviewTypeFromCollaborationType(joinCollaborationType); globalUserInfo.coWorkType = CHAT_UTIL.getCoviewTypeFromCollaborationType(joinCollaborationType);
console.log('----coWorkType ---');
console.log(globalUserInfo.coWorkType);
if (collaborationJoinFlg != '2') { if (collaborationJoinFlg != '2') {
CHAT_SOCKET.connectSocket(); CHAT_SOCKET.connectSocket();
socket.emit('join', CHAT.globalLoginParameter, function() { socket.emit('join', CHAT.globalLoginParameter, function() {
......
#canvasRemote { #canvasRemote {
background-color: white !important; background-color: white !important;
left: 0px !important;
height: 100% !important;
width: 100% !important;
margin-left: 0px !important;
} }
...@@ -123,6 +123,28 @@ $(function () { ...@@ -123,6 +123,28 @@ $(function () {
coview_api.addEventListener("start", function () { coview_api.addEventListener("start", function () {
console.log("=============> START : share start"); console.log("=============> START : share start");
$("#loadingIndicator").removeClass("full_active"); $("#loadingIndicator").removeClass("full_active");
fw.socket.on('message', async function(data) {
console.log('====> message::data: ', data);
if (data.type ==="CHANGE_COLLABORATION") {
if (joinCollaborationType == collaborationType.DOCUMENT) {
if (CHAT_UTIL.isIOS()) {
//TODO 会議室退場処理
} else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom();
}
}
initCollaborationUI(data.payload.collaborationType);
joinCollaborationType = data.payload.collaborationType
if (data.payload.collaborationType == collaborationType.DOCUMENT) {
if (CHAT_UTIL.isIOS()) {
//TODO 会議室に参加し、PIPモードに入る。
} else if (CHAT_UTIL.isAndroid()) {
android.joinMeetingRoom(data.payload.newMeetingId);
}
joinMeetingId = data.payload.newMeetingId;
}
}
});
}); });
coview_api.addEventListener("allbye", function () { coview_api.addEventListener("allbye", function () {
...@@ -305,6 +327,21 @@ function Coview_moveToVideoShareArea() { ...@@ -305,6 +327,21 @@ function Coview_moveToVideoShareArea() {
} }
function changeCollaboration(changeCollaborationType) { function changeCollaboration(changeCollaborationType) {
var newMeetingId = 0;
if (joinCollaborationType == collaborationType.DOCUMENT) {
if (CHAT_UTIL.isIOS()) {
//TODO 会議室を退場し、PIPモードを終了する。(ホストであればルーム削除まで)
} else if (CHAT_UTIL.isAndroid()) {
android.exitMeetingRoom();
}
}
if (CHAT_UTIL.isIOS()) {
//TODO Nativeに変換するCollaborationTypeを保存。
} else if (CHAT_UTIL.isAndroid()) {
android.setJoinCollaborationType(changeCollaborationType);
}
joinCollaborationType = changeCollaborationType;
initCollaborationUI(changeCollaborationType);
switch (changeCollaborationType) { switch (changeCollaborationType) {
case collaborationType.AUDIO: case collaborationType.AUDIO:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
...@@ -317,48 +354,71 @@ function changeCollaboration(changeCollaborationType) { ...@@ -317,48 +354,71 @@ function changeCollaboration(changeCollaborationType) {
break; break;
case collaborationType.DOCUMENT: case collaborationType.DOCUMENT:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
if (CHAT_UTIL.isIOS()) {
//TODO 会議室を開設し、IDを保存
} else if (CHAT_UTIL.isAndroid()) {
newMeetingId = android.createContentView();
console.log('newMeetingId = ' + newMeetingId);
}
break; break;
case collaborationType.BOARD: case collaborationType.BOARD:
coview_api.ChangeCollaboration('audio'); coview_api.ChangeCollaboration('audio');
break; break;
} }
var collaborationChangeMessage = dataMessageScheme + messageSeperator + collaborationChangeMessage; fw.sendToMsg('others', 'CHANGE_COLLABORATION', {"collaborationType": changeCollaborationType, "newMeetingId": newMeetingId});
socket.emit("createMessage", {text: collaborationChangeMessage}, 0);
changeCollaborationType
if (CHAT_UTIL.isIOS()) {
//TODO Nativeに変換するCollaborationTypeを保存。
} else if (CHAT_UTIL.isAndroid()) {
android.setJoinCollaborationType(changeCollaborationType);
}
initCollaborationUI(changeCollaborationType);
} }
function initCollaborationUI(changeCollaborationType){ function initCollaborationUI(changeCollaborationType){
if ($('.user_btn').hasClass("hide")) { if ($('.user_btn').hasClass("hide")) {
$('.user_btn').click(); $('.user_btn').click();
} }
$(".menu_btn").click(); if ($('.menu_btn').hasClass("hide")) {
$(".menu_btn").click();
}
$("link[href='./css/collaboration_board.css']").remove(); $("link[href='./css/collaboration_board.css']").remove();
switch (changeCollaborationType) { switch (changeCollaborationType) {
case collaborationType.AUDIO: case collaborationType.AUDIO:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.voice_contents').removeClass('none'); $('.voice_contents').removeClass('none');
$('.user_btn').click(); var w = $('.user_btn').width();
$('.user_btn').toggleClass("hide");
$("#overlay_user_list.overlay")
.toggleClass("slidein")
.css({ transform: "translateX(" & -w & ")" });
$("#collabo_main").toggleClass("noscroll");
if ($("#overlay_user_list.overlay").hasClass("noscroll")) {
$("#overlay_user_list.overlay").removeClass("noscroll");
} else {
$("#overlay_user_list.overlay").addClass("noscroll");
}
break; break;
case collaborationType.CAMERA: case collaborationType.CAMERA:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.picture_contents').removeClass('none'); $('.picture_contents').removeClass('none');
break; break;
case collaborationType.VIDEO: case collaborationType.VIDEO:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.video_contents').removeClass('none'); $('.video_contents').removeClass('none');
break; break;
case collaborationType.DOCUMENT: case collaborationType.DOCUMENT:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.document_contents').removeClass('none'); $('.document_contents').removeClass('none');
$('.user_btn').click(); var w = $('.user_btn').width();
$('.user_btn').toggleClass("hide");
$("#overlay_user_list.overlay")
.toggleClass("slidein")
.css({ transform: "translateX(" & -w & ")" });
$("#collabo_main").toggleClass("noscroll");
if ($("#overlay_user_list.overlay").hasClass("noscroll")) {
$("#overlay_user_list.overlay").removeClass("noscroll");
} else {
$("#overlay_user_list.overlay").addClass("noscroll");
}
break; break;
case collaborationType.BOARD: case collaborationType.BOARD:
$('.collaboration_contents').addClass('none'); $('.collaboration_contents').addClass('none');
$('.board_contents').removeClass('none'); $('.board_contents').removeClass('none');
...@@ -429,18 +489,18 @@ function Coview_connect_audio_collaboration() { ...@@ -429,18 +489,18 @@ function Coview_connect_audio_collaboration() {
function hostSearchInterval() { function hostSearchInterval() {
let hostName = ""; let hostName = "";
if (g_isMainMan) { function hostSearch() {
if (g_isMainMan) {
$('.host_contents').removeClass('none'); $('.host_contents').removeClass('none');
if (joinCollaborationType == collaborationType.CAMERA) { if (joinCollaborationType == collaborationType.CAMERA) {
$('.photo_select_button').removeClass('none'); $('.photo_select_button').removeClass('none');
} }
} else { } else {
$('.host_contents').addClass('none'); $('.host_contents').addClass('none');
if (joinCollaborationType == collaborationType.CAMERA) { if (joinCollaborationType == collaborationType.CAMERA) {
$('.photo_select_button').addClass('none'); $('.photo_select_button').addClass('none');
} }
} }
function hostSearch() {
if (hostName != g_isMainManUsername) { if (hostName != g_isMainManUsername) {
if (hostName != "") { if (hostName != "") {
$("#collaboration_user_" + hostName).removeClass("host"); $("#collaboration_user_" + hostName).removeClass("host");
......
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