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
26680153
Commit
26680153
authored
May 17, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'develop_change_collaboration'
# Conflicts: # public_new/js/share.js
parents
38efe21c
0ef45e70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
40 deletions
+64
-40
public_new/js/chat-websocket.js
+5
-0
public_new/js/share.js
+59
-40
No files found.
public_new/js/chat-websocket.js
View file @
26680153
...
@@ -201,6 +201,10 @@ function setSocketAction () {
...
@@ -201,6 +201,10 @@ function setSocketAction () {
type
=
text
[
1
];
type
=
text
[
1
];
if
(
type
==
messageType
.
COMMUNICATIONSTART
||
type
==
messageType
.
COMMUNICATIONEND
)
{
if
(
type
==
messageType
.
COMMUNICATIONSTART
||
type
==
messageType
.
COMMUNICATIONEND
)
{
collaborationType
=
text
[
2
];
collaborationType
=
text
[
2
];
var
meetingId
=
0
;
if
(
collaborationType
==
CHAT_UTIL
.
getCollaborationType
(
collaborationTypeKey
.
DOCUMENT
))
{
meetingId
=
text
[
3
];
}
var
userInCollaboration
;
var
userInCollaboration
;
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
userInCollaboration
=
JSON
.
parse
(
CHAT_DB
.
getUserInfoList
(
message
.
userId
));
userInCollaboration
=
JSON
.
parse
(
CHAT_DB
.
getUserInfoList
(
message
.
userId
));
...
@@ -218,6 +222,7 @@ function setSocketAction () {
...
@@ -218,6 +222,7 @@ function setSocketAction () {
insertDate
:
message
.
insertDate
,
insertDate
:
message
.
insertDate
,
collaborationType
:
collaborationType
,
collaborationType
:
collaborationType
,
isToday
:
true
,
isToday
:
true
,
meetingId
:
meetingId
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
,
createdAtTime
:
messageTime
.
createdAtTime
,
isOtherYear
:
false
isOtherYear
:
false
...
...
public_new/js/share.js
View file @
26680153
...
@@ -254,6 +254,7 @@ $(function () {
...
@@ -254,6 +254,7 @@ $(function () {
break
;
break
;
case
"JoinRoomResponse"
:
case
"JoinRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
if
(
json
.
resultCode
==
200
)
{
hostSearchInterval
();
for
(
let
key
in
g_participants
)
{
for
(
let
key
in
g_participants
)
{
loginIdList
.
push
(
key
);
loginIdList
.
push
(
key
);
}
}
...
@@ -307,29 +308,29 @@ function Coview_moveToVideoShareArea() {
...
@@ -307,29 +308,29 @@ function Coview_moveToVideoShareArea() {
}
}
function
Coview_exitCollaboration
(
isDocument
=
false
)
{
function
Coview_exitCollaboration
(
isDocument
=
false
)
{
if
(
isDocument
)
{
if
(
isDocument
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
exitMeetingRoom
.
postMessage
({});
webkit
.
messageHandlers
.
exitMeetingRoom
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
exitMeetingRoom
();
android
.
exitMeetingRoom
();
}
}
}
clearInterval
(
timeInterval
);
}
coview_api
.
LeaveRoom
();
clearInterval
(
timeInterval
);
if
(
coview_api
.
getRoomUsers
())
{
android
.
finishCollaboration
()
};
coview_api
.
LeaveRoom
();
isLeaved
=
true
;
if
(
coview_api
.
getRoomUsers
())
{
android
.
finishCollaboration
()
};
if
(
collaborationJoinFlg
!=
'2'
)
{
isLeaved
=
true
;
CHAT_UI
.
joinRoom
(
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT
.
globalLoginParameter
.
roomId
,
CHAT_UI
.
joinRoom
(
CHAT
.
globalLoginParameter
.
name
CHAT
.
globalLoginParameter
.
roomId
,
);
CHAT
.
globalLoginParameter
.
name
);
}
else
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
openCommunicationHome
();
}
else
{
}
else
{
if
(
typeof
android
!=
"undefined"
)
{
webkit
.
messageHandlers
.
openCommunicationHome
.
postMessage
({});
android
.
openCommunicationHome
();
}
else
{
webkit
.
messageHandlers
.
openCommunicationHome
.
postMessage
({});
}
}
}
}
}
}
function
Coview_changeHost
(
userId
)
{
function
Coview_changeHost
(
userId
)
{
...
@@ -339,7 +340,23 @@ function Coview_changeHost(userId) {
...
@@ -339,7 +340,23 @@ function Coview_changeHost(userId) {
function
Coview_addLoginId
(
loginId
)
{
function
Coview_addLoginId
(
loginId
)
{
console
.
log
(
"addUser loginId = "
+
loginId
);
console
.
log
(
"addUser loginId = "
+
loginId
);
coview_api
.
addUser
(
loginId
);
var
url
=
"https://livetaskyell.abookcloud.com/auth/getuser"
;
$
.
ajax
({
url
:
url
,
method
:
'post'
,
data
:
{
id
:
loginId
},
success
:
function
(
result
)
{
console
.
log
(
"result"
,
result
);
if
(
result
.
statusCode
!=
200
)
{
coview_api
.
addUser
(
loginId
);
}
},
error
:
function
(
err
)
{
console
.
log
(
err
.
toString
());
}
});
}
}
function
Coview_connect_audio_collaboration
()
{
function
Coview_connect_audio_collaboration
()
{
...
@@ -351,30 +368,31 @@ function Coview_connect_audio_collaboration() {
...
@@ -351,30 +368,31 @@ function Coview_connect_audio_collaboration() {
}
}
function
hostSearchInterval
()
{
function
hostSearchInterval
()
{
let
hostName
=
""
;
let
hostName
=
""
;
function
hostSearch
()
{
function
hostSearch
()
{
if
(
hostName
!=
g_isMainManUsername
)
{
if
(
hostName
!=
g_isMainManUsername
)
{
if
(
hostName
!=
""
)
{
if
(
hostName
!=
""
)
{
$
(
"#collaboration_user_"
+
hostName
).
removeClass
(
"host"
);
$
(
"#collaboration_user_"
+
hostName
).
removeClass
(
"host"
);
}
}
$
(
"#collaboration_user_"
+
g_isMainManUsername
).
addClass
(
"host"
);
$
(
"#collaboration_user_"
+
g_isMainManUsername
).
addClass
(
"host"
);
hostName
=
g_isMainManUsername
;
hostName
=
g_isMainManUsername
;
}
else
{
}
else
{
if
(
hostName
==
""
)
{
if
(
hostName
==
""
)
{
if
(
!
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
hasClass
(
"host"
)
&&
coview_api
.
getRoomUsers
())
{
if
(
!
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
hasClass
(
"host"
)
&&
coview_api
.
getRoomUsers
())
{
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
addClass
(
"host"
);
$
(
"#collaboration_user_"
+
CHAT
.
globalLoginParameter
.
loginId
).
addClass
(
"host"
);
}
}
else
{
if
(
!
$
(
"#collaboration_user_"
+
hostName
).
hasClass
(
'host'
))
{
$
(
"#collaboration_user_"
+
hostName
).
addClass
(
"host"
);
}
}
}
}
}
else
{
if
(
!
$
(
"#collaboration_user_"
+
hostName
).
hasClass
(
'host'
))
{
$
(
"#collaboration_user_"
+
hostName
).
addClass
(
"host"
);
}
if
(
g_isMainMan
)
{
if
(
g_isMainMan
)
{
$
(
'.host_contents'
).
removeClass
(
'none'
);
$
(
'.host_contents'
).
removeClass
(
'none'
);
}
else
{
}
else
{
$
(
'.host_contents'
).
addClass
(
'none'
);
$
(
'.host_contents'
).
addClass
(
'none'
);
}
}
}
}
}
timeInterval
=
setInterval
(
hostSearch
,
3000
);
}
timeInterval
=
setInterval
(
hostSearch
,
3000
);
}
}
\ No newline at end of file
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