Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
71170e62
Commit
71170e62
authored
Mar 22, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不要なコードを削除
parent
d1d54cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
51 deletions
+23
-51
public/js/share.js
+23
-51
No files found.
public/js/share.js
View file @
71170e62
/* --------------------------------------------------- */
/* Functions */
/* --------------------------------------------------- */
let
coview_api
=
new
CoviewApi
();
let
coview_api
=
new
CoviewApi
();
$
(
function
()
{
var
coviewApiActive
=
coview_api
.
Init
(
...
...
@@ -18,7 +15,6 @@ $(function() {
// special button IN Chat ui
$
(
"#coviewShareMainBtn"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
if
(
$
(
".coview_share_dropdown_bar"
).
is
(
':visible'
)
==
true
)
{
...
...
@@ -114,7 +110,7 @@ $(function() {
// コントロールメニュー
//
非表示ボタン
//
コントロールメニュー非表示
$
(
"#toolHideBtn"
).
on
(
"click"
,
function
(
e
)
{
$
(
".tool_hide_btn"
).
hide
();
$
(
".coview_tool_area"
).
hide
();
...
...
@@ -126,7 +122,7 @@ $(function() {
$
(
".tool_show_btn"
).
show
();
});
//
表示ボタン
//
コントロールメニュー表示
$
(
"#toolShowBtn"
).
on
(
"click"
,
function
(
e
)
{
$
(
".tool_hide_btn"
).
show
();
$
(
".coview_tool_area"
).
show
();
...
...
@@ -182,42 +178,39 @@ $(function() {
// キャプチャ
$
(
"#captureBtn"
).
on
(
"click"
,
function
(
e
)
{
// TODO
});
// マイク
ボタン
// マイク
$
(
"#coviewMicBtn"
).
on
(
"click"
,
function
(
e
)
{
var
flg
=
$
(
this
).
hasClass
(
"active"
);
if
(
flg
==
true
)
{
$
(
this
).
removeClass
(
"active"
);
document
.
getElementById
(
'coviewMicBtn'
).
innerHTML
=
'<img class="" src="./icon/ic_collaboration_mic_off.png" alt=""> '
;
// マイクOFF
userMute
();
}
else
{
$
(
this
).
addClass
(
"active"
);
document
.
getElementById
(
'coviewMicBtn'
).
innerHTML
=
'<img class="" src="./icon/ic_collaboration_mic_on.png" alt=""> '
;
// マイクON
userUnMute
();
}
});
// レコード
ボタン
// レコード
$
(
"#coviewRecBtn"
).
on
(
"click"
,
function
(
e
)
{
var
flg
=
$
(
this
).
hasClass
(
"active"
);
if
(
flg
==
true
)
{
$
(
this
).
removeClass
(
"active"
);
document
.
getElementById
(
'coviewRecBtn'
).
innerHTML
=
'<img class="" src="./icon/ic_collaboration_record.png" alt="">'
;
// 記録終了
//
TODO
記録終了
// TODO アーカイブ保存
}
else
{
$
(
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="">'
;
// 記録開始
// TODO 記録開始
}
});
// 退室
ボタン
// 退室
$
(
"#coviewLeaveRoomBtn"
).
on
(
"click"
,
function
(
e
)
{
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
...
...
@@ -241,33 +234,24 @@ $(function() {
Coview_moveToVideoShareArea
();
});
// $('#coviewShareRequestVideo').bind('click', function()
// console.log("globalUserInfo", globalUserInfo);
// globalUserInfo.coWorkType = "video";
// coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
// });
/* --------------------------------------------------- */
/* 協業タブ */
/* --------------------------------------------------- */
// 通話
// 協業タブ
// 通話タブ
$
(
"#coviewShareChat"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareChat"
);
// 協業画面へ遷移
globalUserInfo
.
coWorkType
=
"audio"
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
});
// 文書
// 文書
タブ
$
(
"#coviewShareDoc"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareDoc"
);
alert
(
"INTO a document share mode (only audio)"
);
globalUserInfo
.
coWorkType
=
"audio"
;
// TODO 文書協業画面へ遷移
});
// 画像
()
// 画像
タブ
$
(
"#coviewSharePhoto"
).
on
(
"click"
,
function
(
e
)
{
e
.
stopPropagation
();
console
.
log
(
"ON click coviewSharePhoto"
);
...
...
@@ -278,7 +262,7 @@ $(function() {
}
});
// 画像(カメラ)
// 画像(カメラ
起動
)
$
(
"#coviewSharePhotoCamera"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
"camera"
;
...
...
@@ -286,7 +270,7 @@ $(function() {
Coview_moveToVideoShareArea
();
});
// 画像(
ライブラリ
)
// 画像(
カメラロール
)
$
(
"#coviewSharePhotoGalary"
).
on
(
"click"
,
function
()
{
$
(
".coview_share_photo_select_bubble"
).
hide
();
globalUserInfo
.
coWorkType
=
"galary"
;
...
...
@@ -294,35 +278,25 @@ $(function() {
Coview_moveToVideoShareArea
();
});
// 動画
// 動画
タブ
$
(
"#coviewShareLive"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareLive"
);
globalUserInfo
.
coWorkType
=
"video"
;
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_moveToVideoShareArea
();
});
// ボード
// ボード
タブ
$
(
"#coviewShareBoad"
).
on
(
"click"
,
function
()
{
console
.
log
(
"ON click coviewShareBoad"
);
// 協業画面へ遷移
globalUserInfo
.
coWorkType
=
"audio"
;
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
Coview_moveToVideoShareArea
();
});
// Fermi_API連動
coview_api
.
addEventListener
(
"ready"
,
function
()
{
console
.
log
(
"=============> READY : ready for coview api"
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
...
...
@@ -436,7 +410,7 @@ function Coview_setControlMenu() {
$
(
'#toolAreaSwitcher'
).
hide
();
$
(
'#coviewToolArea'
).
hide
();
break
;
// TODO 他の協業
// TODO 他の協業
の場合
default
:
$
(
'#toolAreaSwitcher'
).
show
();
$
(
'#coviewToolArea'
).
show
();
...
...
@@ -450,7 +424,6 @@ function Coview_setCoviewTypeBtn() {
// 様式を読み込む
const
typeTemplate
=
$
(
'#coview-type-template'
).
html
();
switch
(
globalUserInfo
.
coWorkType
)
{
case
"audio"
:
let
html
=
Mustache
.
render
(
typeTemplate
,
{
...
...
@@ -485,7 +458,6 @@ function Coview_setCoviewMember() {
// 様式を読み込む
const
memberTemplate
=
$
(
'#coview-member-template'
).
html
();
memberList
.
forEach
(
function
(
member
)
{
// ホストの場合は右上に帯を追加
// TODO ホスト判定&プロフィール画像取得
...
...
@@ -576,11 +548,11 @@ function Coview_setTime() {
var
sec
=
diff
.
getSeconds
();
var
min
=
diff
.
getMinutes
();
var
strSec
=
""
+
sec
;
if
(
strSec
.
length
<
2
){
if
(
strSec
.
length
<
2
)
{
strSec
=
"0"
+
strSec
;
}
strMin
=
""
+
min
;
if
(
strMin
.
length
<
2
){
if
(
strMin
.
length
<
2
)
{
strMin
=
"0"
+
strMin
;
}
var
strTime
=
strMin
+
":"
+
strSec
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment