Commit 3730ef32 by Kang Donghun

インデント修正

parent 5495c67d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* Functions */ /* Functions */
/* --------------------------------------------------- */ /* --------------------------------------------------- */
let coview_api = new CoviewApi(); let coview_api = new CoviewApi();
$(function(){ $(function() {
var coviewApiActive = coview_api.Init( var coviewApiActive = coview_api.Init(
{ {
testSTRParam : "param1", testSTRParam : "param1",
...@@ -15,31 +15,30 @@ $(function(){ ...@@ -15,31 +15,30 @@ $(function(){
); );
// special button IN Chat ui // special button IN Chat ui
$("#coviewShareMainBtn").on("click", function(e){ $("#coviewShareMainBtn").on("click", function(e) {
e.stopPropagation(); e.stopPropagation();
if($(".coview_share_dropdown_bar").is(':visible') == true){ if ($(".coview_share_dropdown_bar").is(':visible') == true) {
Coview_shareDropdownHide(); Coview_shareDropdownHide();
if($(".coview_share_photo_select_bubble").is(':visible') == true){ if ($(".coview_share_photo_select_bubble").is(':visible') == true) {
$(".coview_share_photo_select_bubble").slideUp(); $(".coview_share_photo_select_bubble").slideUp();
} }
} } else {
else{
$(".coview_share_dropdown_bar").slideDown(); $(".coview_share_dropdown_bar").slideDown();
} }
}); });
$("#coviewShareCloseButton").on("click", function(e){ $("#coviewShareCloseButton").on("click", function(e) {
coview_api.LeaveRoom(); coview_api.LeaveRoom();
$(".coview_share_area").hide(); $(".coview_share_area").hide();
}); });
$("body").on("click", function(){ $("body").on("click", function() {
Coview_shareDropdownHide(); Coview_shareDropdownHide();
}); });
$(document).on("click", ".coview_share_request", function(){ $(document).on("click", ".coview_share_request", function() {
console.log("globalUserInfo", globalUserInfo); console.log("globalUserInfo", globalUserInfo);
if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) { if ($(this).hasClass(collaborationTypeKey.VIDEO) == true) {
globalUserInfo.coWorkType = collaborationTypeKey.VIDEO; globalUserInfo.coWorkType = collaborationTypeKey.VIDEO;
...@@ -54,31 +53,23 @@ $(function(){ ...@@ -54,31 +53,23 @@ $(function(){
coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// $('#coviewShareRequestVideo').bind('click', function()
// console.log("globalUserInfo", globalUserInfo);
// globalUserInfo.coWorkType = "video";
// coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
// });
/* --------------------------------------------------- */ /* --------------------------------------------------- */
/* Video, photo, chat, doc */ /* Video, photo, chat, doc */
/* --------------------------------------------------- */ /* --------------------------------------------------- */
$("#coviewShareChat").on("click", function(){ $("#coviewShareChat").on("click", function() {
console.log("ON click coviewShareChat"); console.log("ON click coviewShareChat");
}); });
$("#coviewSharePhoto").on("click", function(e){ $("#coviewSharePhoto").on("click", function(e) {
e.stopPropagation(); e.stopPropagation();
console.log("ON click coviewSharePhoto"); console.log("ON click coviewSharePhoto");
if($(".coview_share_photo_select_bubble").is(':visible') == true){ if ($(".coview_share_photo_select_bubble").is(':visible') == true) {
$(".coview_share_photo_select_bubble").slideUp(); $(".coview_share_photo_select_bubble").slideUp();
} } else {
else{
$(".coview_share_photo_select_bubble").slideDown(); $(".coview_share_photo_select_bubble").slideDown();
} }
}); });
...@@ -86,7 +77,7 @@ $(function(){ ...@@ -86,7 +77,7 @@ $(function(){
$("#coviewSharePhotoCamera").on("click", function(){ $("#coviewSharePhotoCamera").on("click", function() {
$(".coview_share_photo_select_bubble").hide(); $(".coview_share_photo_select_bubble").hide();
globalUserInfo.coWorkType = collaborationTypeKey.CAMERA; globalUserInfo.coWorkType = collaborationTypeKey.CAMERA;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
...@@ -94,7 +85,7 @@ $(function(){ ...@@ -94,7 +85,7 @@ $(function(){
$(".coview_share_title_name").text("カメラ"); $(".coview_share_title_name").text("カメラ");
}); });
$("#coviewSharePhotoGallery").on("click", function(){ $("#coviewSharePhotoGallery").on("click", function() {
$(".coview_share_photo_select_bubble").hide(); $(".coview_share_photo_select_bubble").hide();
globalUserInfo.coWorkType = "gallery"; globalUserInfo.coWorkType = "gallery";
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
...@@ -103,7 +94,7 @@ $(function(){ ...@@ -103,7 +94,7 @@ $(function(){
$(".coview_share_title_name").text("ライブラリ"); $(".coview_share_title_name").text("ライブラリ");
}); });
$("#coviewShareAudio").on("click", function(){ $("#coviewShareAudio").on("click", function() {
globalUserInfo.coWorkType = collaborationTypeKey.AUDIO; globalUserInfo.coWorkType = collaborationTypeKey.AUDIO;
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
...@@ -112,31 +103,22 @@ $(function(){ ...@@ -112,31 +103,22 @@ $(function(){
}) })
$("#coviewShareLive").on("click", function(){ $("#coviewShareLive").on("click", function() {
console.log("ON click coviewShareLive"); console.log("ON click coviewShareLive");
globalUserInfo.coWorkType = "video"; globalUserInfo.coWorkType = "video";
console.log("globalUserInfo", globalUserInfo); console.log("globalUserInfo", globalUserInfo);
// var chars = "0123456789";
// var string_length = 6;
// var randomstring = '';
// for (var i=0; i<string_length; i++) {
// var rnum = Math.floor(Math.random() * chars.length);
// randomstring += chars.substring(rnum,rnum+1);
// }
// coview_api.CreateRoom(randomstring, globalUserInfo.coWorkType);
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
$(".coview_share_title_name").text("LIVE"); $(".coview_share_title_name").text("LIVE");
}); });
$("#coviewShareDoc").on("click", function(){ // $("#coviewShareDoc").on("click", function(){
console.log("ON click coviewShareDoc"); // console.log("ON click coviewShareDoc");
alert("INTO a document share mode (only audio)"); // alert("INTO a document share mode (only audio)");
globalUserInfo.coWorkType = "audio"; // globalUserInfo.coWorkType = "audio";
}); // });
coview_api.addEventListener ("ready", function () { coview_api.addEventListener ("ready", function () {
console.log("=============> READY : ready for coview api"); console.log("=============> READY : ready for coview api");
...@@ -172,22 +154,17 @@ $(function(){ ...@@ -172,22 +154,17 @@ $(function(){
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
break; break;
case "CreateRoomResponse": case "CreateRoomResponse":
if(json.resultCode == 200){ if (json.resultCode == 200) {
var coviewInviteMessage = "" + messageSeperator + messageType.COMMUNICATIONSTART + messageSeperator + CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType); var coviewInviteMessage = "" + messageSeperator + messageType.COMMUNICATIONSTART + messageSeperator + CHAT_UTIL.getCollaborationType(globalUserInfo.coWorkType);
socket.emit('createMessage', { socket.emit('createMessage', {
text: coviewInviteMessage text: coviewInviteMessage
}, 0); }, 0);
} } else {
else{
} }
break; break;
case "JoinRoomInfoResponse": case "JoinRoomInfoResponse":
if (json.resultCode == 200) { if (json.resultCode == 200) {
} } else {
else{
// alert(json.resultMsg + "(" + json.resultCode + ")" );
alert("Not exist sharing call (" + json.resultCode + ")\nPlease using share menu."); alert("Not exist sharing call (" + json.resultCode + ")\nPlease using share menu.");
coview_api.LeaveRoom(); coview_api.LeaveRoom();
$(".coview_share_area").hide(); $(".coview_share_area").hide();
...@@ -195,7 +172,7 @@ $(function(){ ...@@ -195,7 +172,7 @@ $(function(){
} }
break; break;
case "JoinRoomResponse": case "JoinRoomResponse":
if (json.resultCode == 200){ if (json.resultCode == 200) {
for (let key in g_participants) { for (let key in g_participants) {
loginIdList.push(key); loginIdList.push(key);
} }
...@@ -222,18 +199,18 @@ $(function(){ ...@@ -222,18 +199,18 @@ $(function(){
}); });
}); });
function Coview_shareDropdownHide(){ function Coview_shareDropdownHide() {
$(".coview_share_dropdown_bar").slideUp(); $(".coview_share_dropdown_bar").slideUp();
$(".coview_share_photo_select_bubble").slideUp(); $(".coview_share_photo_select_bubble").slideUp();
} }
function Coview_moveToVideoShareArea(){ function Coview_moveToVideoShareArea() {
$("#loadingIndicator").addClass("full_active"); $("#loadingIndicator").addClass("full_active");
$(".coview_share_area").show(); $(".coview_share_area").show();
$('#collabo_main').removeClass('none'); $('#collabo_main').removeClass('none');
} }
function Coview_exitCollaboration(){ function Coview_exitCollaboration() {
coview_api.LeaveRoom(); coview_api.LeaveRoom();
CHAT_UI.joinRoom(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.name); CHAT_UI.joinRoom(CHAT.globalLoginParameter.roomId, CHAT.globalLoginParameter.name);
} }
......
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