Commit 71170e62 by Takatoshi Miura

不要なコードを削除

parent d1d54cea
/* --------------------------------------------------- */
/* Functions */
/* --------------------------------------------------- */
let coview_api = new CoviewApi();
let coview_api = new CoviewApi();
$(function() { $(function() {
var coviewApiActive = coview_api.Init ( var coviewApiActive = coview_api.Init (
...@@ -18,7 +15,6 @@ $(function() { ...@@ -18,7 +15,6 @@ $(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) {
...@@ -114,7 +110,7 @@ $(function() { ...@@ -114,7 +110,7 @@ $(function() {
// コントロールメニュー // コントロールメニュー
// 非表示ボタン // コントロールメニュー非表示
$("#toolHideBtn").on("click", function(e) { $("#toolHideBtn").on("click", function(e) {
$(".tool_hide_btn").hide(); $(".tool_hide_btn").hide();
$(".coview_tool_area").hide(); $(".coview_tool_area").hide();
...@@ -126,7 +122,7 @@ $(function() { ...@@ -126,7 +122,7 @@ $(function() {
$(".tool_show_btn").show(); $(".tool_show_btn").show();
}); });
// 表示ボタン // コントロールメニュー表示
$("#toolShowBtn").on("click", function(e) { $("#toolShowBtn").on("click", function(e) {
$(".tool_hide_btn").show(); $(".tool_hide_btn").show();
$(".coview_tool_area").show(); $(".coview_tool_area").show();
...@@ -182,42 +178,39 @@ $(function() { ...@@ -182,42 +178,39 @@ $(function() {
// キャプチャ // キャプチャ
$("#captureBtn").on("click", function(e) { $("#captureBtn").on("click", function(e) {
// TODO
}); });
// マイクボタン // マイク
$("#coviewMicBtn").on("click", function(e) { $("#coviewMicBtn").on("click", function(e) {
var flg = $(this).hasClass("active"); var flg = $(this).hasClass("active");
if (flg == true) { if (flg == true) {
$(this).removeClass("active"); $(this).removeClass("active");
document.getElementById('coviewMicBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_mic_off.png" alt=""> '; document.getElementById('coviewMicBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_mic_off.png" alt=""> ';
// マイクOFF
userMute(); userMute();
} else { } else {
$(this).addClass("active"); $(this).addClass("active");
document.getElementById('coviewMicBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_mic_on.png" alt=""> '; document.getElementById('coviewMicBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_mic_on.png" alt=""> ';
// マイクON
userUnMute(); userUnMute();
} }
}); });
// レコードボタン // レコード
$("#coviewRecBtn").on("click", function(e) { $("#coviewRecBtn").on("click", function(e) {
var flg = $(this).hasClass("active"); var flg = $(this).hasClass("active");
if (flg == true) { if (flg == true) {
$(this).removeClass("active"); $(this).removeClass("active");
document.getElementById('coviewRecBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_record.png" alt="">'; document.getElementById('coviewRecBtn').innerHTML = '<img class="" src="./icon/ic_collaboration_record.png" alt="">';
// 記録終了 // TODO 記録終了
// TODO アーカイブ保存
} else { } else {
$(this).addClass("active"); $(this).addClass("active");
document.getElementById('coviewRecBtn').innerHTML = '<img class="" src="https://app.coview.co.kr:7443/office_img/api/icon_api_record_stop.png" alt="">'; document.getElementById('coviewRecBtn').innerHTML = '<img class="" src="https://app.coview.co.kr:7443/office_img/api/icon_api_record_stop.png" alt="">';
// 記録開始 // TODO 記録開始
} }
}); });
// 退室ボタン // 退室
$("#coviewLeaveRoomBtn").on("click", function(e) { $("#coviewLeaveRoomBtn").on("click", function(e) {
coview_api.LeaveRoom(); coview_api.LeaveRoom();
$(".coview_share_area").hide(); $(".coview_share_area").hide();
...@@ -241,33 +234,24 @@ $(function() { ...@@ -241,33 +234,24 @@ $(function() {
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// $('#coviewShareRequestVideo').bind('click', function() // 協業タブ
// console.log("globalUserInfo", globalUserInfo); // 通話タブ
// globalUserInfo.coWorkType = "video";
// coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
// });
/* --------------------------------------------------- */
/* 協業タブ       */
/* --------------------------------------------------- */
// 通話
$("#coviewShareChat").on("click", function() { $("#coviewShareChat").on("click", function() {
console.log("ON click coviewShareChat"); console.log("ON click coviewShareChat");
// 協業画面へ遷移
globalUserInfo.coWorkType = "audio"; globalUserInfo.coWorkType = "audio";
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// 文書 // 文書タブ
$("#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";
// TODO 文書協業画面へ遷移
}); });
// 画像() // 画像タブ
$("#coviewSharePhoto").on("click", function(e) { $("#coviewSharePhoto").on("click", function(e) {
e.stopPropagation(); e.stopPropagation();
console.log("ON click coviewSharePhoto"); console.log("ON click coviewSharePhoto");
...@@ -278,7 +262,7 @@ $(function() { ...@@ -278,7 +262,7 @@ $(function() {
} }
}); });
// 画像(カメラ) // 画像(カメラ起動)
$("#coviewSharePhotoCamera").on("click", function() { $("#coviewSharePhotoCamera").on("click", function() {
$(".coview_share_photo_select_bubble").hide(); $(".coview_share_photo_select_bubble").hide();
globalUserInfo.coWorkType = "camera"; globalUserInfo.coWorkType = "camera";
...@@ -286,7 +270,7 @@ $(function() { ...@@ -286,7 +270,7 @@ $(function() {
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// 画像(ライブラリ) // 画像(カメラロール)
$("#coviewSharePhotoGalary").on("click", function() { $("#coviewSharePhotoGalary").on("click", function() {
$(".coview_share_photo_select_bubble").hide(); $(".coview_share_photo_select_bubble").hide();
globalUserInfo.coWorkType = "galary"; globalUserInfo.coWorkType = "galary";
...@@ -294,35 +278,25 @@ $(function() { ...@@ -294,35 +278,25 @@ $(function() {
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// 動画 // 動画タブ
$("#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();
}); });
// ボード // ボードタブ
$("#coviewShareBoad").on("click", function() { $("#coviewShareBoad").on("click", function() {
console.log("ON click coviewShareBoad"); console.log("ON click coviewShareBoad");
// 協業画面へ遷移
globalUserInfo.coWorkType = "audio"; globalUserInfo.coWorkType = "audio";
coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.CreateRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
}); });
// Fermi_API連動
coview_api.addEventListener ("ready", function () { coview_api.addEventListener ("ready", function () {
console.log("=============> READY : ready for coview api"); console.log("=============> READY : ready for coview api");
coview_api.Login(globalUserInfo.loginId); coview_api.Login(globalUserInfo.loginId);
...@@ -436,7 +410,7 @@ function Coview_setControlMenu() { ...@@ -436,7 +410,7 @@ function Coview_setControlMenu() {
$('#toolAreaSwitcher').hide(); $('#toolAreaSwitcher').hide();
$('#coviewToolArea').hide(); $('#coviewToolArea').hide();
break; break;
// TODO 他の協業 // TODO 他の協業の場合
default: default:
$('#toolAreaSwitcher').show(); $('#toolAreaSwitcher').show();
$('#coviewToolArea').show(); $('#coviewToolArea').show();
...@@ -450,7 +424,6 @@ function Coview_setCoviewTypeBtn() { ...@@ -450,7 +424,6 @@ function Coview_setCoviewTypeBtn() {
// 様式を読み込む // 様式を読み込む
const typeTemplate = $('#coview-type-template').html(); const typeTemplate = $('#coview-type-template').html();
switch (globalUserInfo.coWorkType) { switch (globalUserInfo.coWorkType) {
case "audio": case "audio":
let html = Mustache.render(typeTemplate, { let html = Mustache.render(typeTemplate, {
...@@ -485,7 +458,6 @@ function Coview_setCoviewMember() { ...@@ -485,7 +458,6 @@ function Coview_setCoviewMember() {
// 様式を読み込む // 様式を読み込む
const memberTemplate = $('#coview-member-template').html(); const memberTemplate = $('#coview-member-template').html();
memberList.forEach(function(member) { memberList.forEach(function(member) {
// ホストの場合は右上に帯を追加 // ホストの場合は右上に帯を追加
// TODO ホスト判定&プロフィール画像取得 // TODO ホスト判定&プロフィール画像取得
...@@ -576,11 +548,11 @@ function Coview_setTime() { ...@@ -576,11 +548,11 @@ function Coview_setTime() {
var sec = diff.getSeconds(); var sec = diff.getSeconds();
var min = diff.getMinutes(); var min = diff.getMinutes();
var strSec = "" + sec; var strSec = "" + sec;
if ( strSec.length < 2){ if ( strSec.length < 2) {
strSec = "0" + strSec; strSec = "0" + strSec;
} }
strMin = "" + min; strMin = "" + min;
if ( strMin.length < 2){ if ( strMin.length < 2) {
strMin = "0" + strMin; strMin = "0" + strMin;
} }
var strTime = strMin + ":" + strSec; var strTime = strMin + ":" + strSec;
......
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