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
40d72c94
Commit
40d72c94
authored
May 14, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コード整理
parent
bc4fd237
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
147 deletions
+3
-147
public_new/js/share.js
+3
-147
No files found.
public_new/js/share.js
View file @
40d72c94
...
...
@@ -184,7 +184,7 @@ $(function () {
);
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO 画面を縮小し、会議室に入場する処理
meetingId
=
CHAT_DB
.
createContentView
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
meetingId
=
android
.
createContentView
();
}
...
...
@@ -193,140 +193,6 @@ $(function () {
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
Coview_moveToVideoShareArea
();
<<<<<<<
HEAD
$
(
".coview_share_title_name"
).
text
(
"LIVE"
);
});
// $("#coviewShareDoc").on("click", function(){
// console.log("ON click coviewShareDoc");
// alert("INTO a document share mode (only audio)");
// globalUserInfo.coWorkType = "audio";
// });
coview_api
.
addEventListener
(
"ready"
,
function
()
{
console
.
log
(
"=============> READY : ready for coview api"
);
Coview_addLoginId
(
globalUserInfo
.
loginId
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
});
coview_api
.
addEventListener
(
"start"
,
function
()
{
console
.
log
(
"=============> START : share start"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"allbye"
,
function
()
{
console
.
log
(
"=============> ALL BYE : share allbye"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"guestbye"
,
function
()
{
console
.
log
(
"=============> GUEST BYE : share guestbye"
);
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"hostbye"
,
function
()
{
console
.
log
(
"=============> HOST BYE : share hostbye"
);
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
Coview_exitCollaboration
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
console
.
log
(
"=============> DESTROY : share destroy"
);
coview_api
.
LeaveRoom
();
$
(
".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
);
if
(
isLeaved
)
return
;
let
loginIdList
=
new
Array
();
switch
(
json
.
api
){
case
"LoginResponse"
:
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
())
{
webkit
.
messageHandlers
.
startContentView
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
startContentView
();
}
}
}
else
if
(
collaborationJoinFlg
==
'0'
)
{
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
meetingId
=
CHAT_DB
.
createContentView
();
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
meetingId
=
android
.
createContentView
();
}
}
}
else
if
(
collaborationJoinFlg
==
'2'
)
{
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
}
Coview_moveToVideoShareArea
();
break
;
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
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
;
case
"JoinRoomInfoResponse"
:
if
(
json
.
resultCode
==
200
)
{
}
else
{
alert
(
"Not exist sharing call ("
+
json
.
resultCode
+
")
\
nPlease using share menu."
);
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
}
break
;
case
"JoinRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
}
else
{
}
break
;
case
"RoomMemberJoinedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
case
"RoomMemberLeavedEvent"
:
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
}
CHAT_UI
.
refreshJoinedCollaboration
(
loginIdList
);
break
;
default
:
console
.
log
(
'Unrecognized api'
,
json
);
break
;
}
});
=======
break
;
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
...
...
@@ -402,7 +268,6 @@ $(function () {
break
;
}
});
>>>>>>>
4
f062177e60f67d0fa536858ff5e5c966cbb8997
});
function
Coview_shareDropdownHide
()
{
...
...
@@ -417,20 +282,11 @@ function Coview_moveToVideoShareArea() {
}
function
Coview_exitCollaboration
(
isDocument
=
false
)
{
<<<<<<<
HEAD
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
exitMeetingRoom
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
exitMeetingRoom
();
}
=======
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
//TODO IOS会議室退場処理
webkit
.
messageHandlers
.
exitMeetingRoom
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
exitMeetingRoom
();
>>>>>>>
4
f062177e60f67d0fa536858ff5e5c966cbb8997
android
.
exitMeetingRoom
();
}
}
coview_api
.
LeaveRoom
();
...
...
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