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
e95209e0
Commit
e95209e0
authored
Jul 15, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed collaboration info to globalUserInfo
parent
43cc7cac
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
256 additions
and
238 deletions
+256
-238
public_new/collaboration.html
+5
-21
public_new/collaboration_documents.html
+1
-5
public_new/collaboration_picture.html
+3
-14
public_new/collaboration_video.html
+4
-13
public_new/collaboration_voice.html
+2
-9
public_new/collaboration_whiteboard.html
+3
-12
public_new/footer_collabo.html
+1
-1
public_new/js/Models/coview-userinfo.js
+76
-5
public_new/js/Models/roominfo.js
+3
-2
public_new/js/common/constant.js
+8
-2
public_new/js/common/native-bridge-datasource.js
+2
-19
public_new/js/common/native-bridge-delegate.js
+14
-11
public_new/js/sockets/chat-websocket-message.js
+2
-5
public_new/js/utils/chat-util.js
+13
-15
public_new/js/views/chats/chat-list.js
+3
-3
public_new/js/views/chats/chat-room-message.js
+6
-6
public_new/js/views/collaboration/collaboration-add-user.js
+1
-3
public_new/js/views/collaboration/collaboration.js
+9
-1
public_new/js/views/collaboration/fermi-web-socket-bridge.js
+2
-1
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
+20
-21
public_new/js/views/collaboration/share-bind-button-action.js
+1
-1
public_new/js/views/collaboration/share-event-listener.js
+72
-57
public_new/js/views/collaboration/share.js
+5
-11
No files found.
public_new/collaboration.html
View file @
e95209e0
...
...
@@ -45,7 +45,7 @@
<div
class=
"menu-bar menu-bar2"
></div>
<div
class=
"menu-bar menu-bar3"
></div>
</div>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
_
exitCollaboration();"></button> -->
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
Bridge.
exitCollaboration();"></button> -->
</div>
</div>
</div>
...
...
@@ -169,24 +169,12 @@
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
$
(
"#zoom"
).
load
(
"./zoom.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
let
collaborationJoinFlg
=
0
;
let
isInvited
=
0
;
let
joinCollaborationType
=
0
;
let
joinMeetingId
=
0
;
let
androidVersion
=
0
;
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
joinCollaborationType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
if
(
deviceInfo
.
isAndroid
())
{
androidVersion
=
android
.
getAndroidVersion
();
if
(
joinCollaborationT
ype
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
if
(
globalUserInfo
.
collaborationType
.
t
ype
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
alert
(
getLocalizedString
(
'not_support_version'
));
if
(
typeof
android
!=
"undefined"
)
{
NativeBridgeDelegate
.
openCommunicationHome
();
...
...
@@ -194,14 +182,10 @@
}
}
updateCollaborationUI
(
joinCollaborationType
);
globalUserInfo
.
coWorkType
=
CHAT_UTIL
.
getCoviewTypeFromCollaborationType
(
joinCollaborationType
);
if
(
collaborationJoinFlg
!=
'2'
)
{
CHAT_SOCKET
.
initialJoin
();
}
updateCollaborationUI
(
globalUserInfo
.
collaborationType
);
function
startPipMode
(
)
{
NativeBridgeDelegate
.
startPIPMode
();
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
</script>
</body>
...
...
public_new/collaboration_documents.html
View file @
e95209e0
...
...
@@ -114,11 +114,7 @@
$
(
"#collaboration_voice_overlay_menu"
).
load
(
"./collaboration_voice_overlay_menu.html"
);
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
let
collaborationJoinFlg
=
0
;
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
DOCUMENT
;
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
DOCUMENT
;
CHAT_SOCKET
.
initialJoin
();
function
finishPipMode
()
{
...
...
public_new/collaboration_picture.html
View file @
e95209e0
...
...
@@ -29,7 +29,7 @@
<button
type=
"button"
name=
"button"
class=
"btn user_btn"
></button>
<button
type=
"button"
name=
"button"
class=
"btn menu_btn"
></button>
<button
type=
"button"
name=
"button"
class=
"btn add_user_btn none"
></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
_
exitCollaboration();"></button> -->
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
Bridge.
exitCollaboration();"></button> -->
</div>
</div>
</div>
...
...
@@ -147,7 +147,6 @@
<script
src=
"./js/Models/userinfo.js"
></script>
<script
src=
"./js/Models/roominfo.js"
></script>
<script
src=
"./js/Models/socket-joininfo.js"
></script>
<!-- Socket -->
<script
src=
"./js/sockets/chat-websocket.js"
></script>
<script
src=
"./js/sockets/chat-websocket-message.js"
></script>
...
...
@@ -173,20 +172,10 @@
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
$
(
"#zoom"
).
load
(
"./zoom.html"
);
let
collaborationJoinFlg
=
0
;
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
CAMERA
;
if
(
collaborationJoinFlg
!=
'2'
)
{
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/collaboration_video.html
View file @
e95209e0
...
...
@@ -32,7 +32,7 @@
<div
class=
"menu-bar menu-bar2"
></div>
<div
class=
"menu-bar menu-bar3"
></div>
</div>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
_
exitCollaboration();"></button> -->
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
Bridge.
exitCollaboration();"></button> -->
</div>
</div>
</div>
...
...
@@ -163,20 +163,12 @@
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
$
(
"#zoom"
).
load
(
"./zoom.html"
);
let
collaborationJoinFlg
=
0
;
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
VIDEO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
VIDEO
;
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</html>
\ No newline at end of file
public_new/collaboration_voice.html
View file @
e95209e0
...
...
@@ -114,17 +114,10 @@
$
(
"#collaboration_voice_overlay_menu"
).
load
(
"./collaboration_voice_overlay_menu.html"
);
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
AUDIO
;
if
(
collaborationJoinFlg
!=
'2'
)
{
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
AUDIO
;
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/collaboration_whiteboard.html
View file @
e95209e0
...
...
@@ -28,7 +28,7 @@
<button
type=
"button"
name=
"button"
class=
"btn user_btn"
></button>
<button
type=
"button"
name=
"button"
class=
"btn add_user_btn none"
></button>
<button
type=
"button"
name=
"button"
class=
"btn menu_btn"
></button>
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
_
exitCollaboration();"></button> -->
<!-- <button type="button" name="button" class="btn exit_btn" onclick="Coview
Bridge.
exitCollaboration();"></button> -->
</div>
</div>
</div>
...
...
@@ -164,19 +164,10 @@
$
(
"#add_user_list"
).
load
(
"./modal_add_user_list.html"
);
$
(
"#zoom"
).
load
(
"./zoom.html"
);
let
collaborationJoinFlg
=
0
;
collaborationJoinFlg
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
globalUserInfo
.
coWorkType
=
CollaborationTypeKey
.
BOARD
;
if
(
collaborationJoinFlg
!=
'2'
)
{
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
BOARD
;
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
'.add_user_btn'
).
removeClass
(
'none'
);
}
</script>
</body>
...
...
public_new/footer_collabo.html
View file @
e95209e0
...
...
@@ -59,7 +59,7 @@
</a>
</div>
<div
class=
"footer_item mx-md-3"
>
<a
href=
"javascript:Coview
_
exitCollaboration(isDocument);"
>
<a
href=
"javascript:Coview
Bridge.
exitCollaboration(isDocument);"
>
<div
class=
"img_wrap bg_red mx-1"
>
<img
src=
"icon/icon_close_white.png"
alt=
"閉じる"
>
</div>
...
...
public_new/js/Models/coview-userinfo.js
View file @
e95209e0
NativeBridgeDataSource
.
getCollaborationJoinFlg
=
function
()
{
if
(
typeof
android
!=
"undefined"
)
{
return
android
.
getCollaborationJoinFlg
();
}
else
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCollaborationJoinFlg
,
{});
}
};
var
CoviewUserInfo
=
class
{
sid
;
loginId
;
roomId
;
shopName
;
coWorkType
;
constructor
(
sid
,
loginId
,
roomId
,
shopName
,
coWorkType
)
{
collaborationType
;
joinType
;
isLeaved
;
meetingID
;
constructor
(
sid
,
loginId
,
roomId
,
shopName
)
{
this
.
sid
=
sid
;
this
.
loginId
=
loginId
;
this
.
roomId
=
roomId
;
this
.
shopName
=
shopName
;
this
.
coWorkType
=
coWorkType
;
const
unwrappedType
=
NativeBridgeDataSource
.
getJoinCollaborationType
();
this
.
collaborationType
=
this
.
parseNumberToCoworkType
(
unwrappedType
);
this
.
joinType
=
NativeBridgeDataSource
.
getCollaborationJoinFlg
();
this
.
isLeaved
=
false
;
this
.
meetingID
=
0
;
}
get
coWorkType
()
{
switch
(
this
.
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
return
COLLABORATION_TYPE
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
return
COLLABORATION_TYPE
.
VIDEO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
DOCUMENT
;
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE
.
BOARD
;
}
}
isInvited
()
{
this
.
joinType
==
COLLABORATION_JOIN_TYPE
.
INVITED
;
}
parseNumberToCoworkType
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE_NUMBER
.
CAMERA
:
return
COLLABORATION_TYPE
.
CAMERA
;
case
COLLABORATION_TYPE_NUMBER
.
VIDEO
:
return
COLLABORATION_TYPE
.
VIDEO
;
case
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
DOCUMENT
;
case
COLLABORATION_TYPE_NUMBER
.
BOARD
:
return
COLLABORATION_TYPE
.
BOARD
;
default
:
return
0
;
}
}
getCollaborarionTypeAsNumber
()
{
return
this
.
parseCoworkTypeToNumber
(
this
.
collaborationType
);
}
parseCoworkTypeToNumber
(
type
)
{
switch
(
type
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
return
COLLABORATION_TYPE_NUMBER
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
return
COLLABORATION_TYPE_NUMBER
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
return
COLLABORATION_TYPE_NUMBER
.
VIDEO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
;
case
COLLABORATION_TYPE
.
BOARD
:
return
COLLABORATION_TYPE_NUMBER
.
BOARD
;
default
:
return
0
;
}
}
};
...
...
@@ -18,6 +90,5 @@ var globalUserInfo = new CoviewUserInfo(
currentUserInfo
.
sid
,
currentUserInfo
.
loginID
,
roomInfo
.
roomID
,
currentUserInfo
.
shopName
,
""
currentUserInfo
.
shopName
);
public_new/js/Models/roominfo.js
View file @
e95209e0
...
...
@@ -9,10 +9,12 @@ NativeBridgeDataSource.getRoomInfo = function () {
var
RoomInfo
=
class
{
roomID
;
roomName
;
roomType
;
constructor
(
roomInfo
)
{
this
.
roomID
=
roomInfo
.
roomID
;
this
.
roomName
=
roomInfo
.
roomName
;
this
.
roomType
=
roomInfo
.
roomType
;
}
};
var
roomInfo
=
new
RoomInfo
(
NativeBridgeDataSource
.
getRoomInfo
());
\ No newline at end of file
var
roomInfo
=
new
RoomInfo
(
NativeBridgeDataSource
.
getRoomInfo
());
public_new/js/common/constant.js
View file @
e95209e0
...
...
@@ -24,7 +24,7 @@ const ChatRoomType = {
ALL
:
"2"
,
};
const
C
ollaborationTypeKey
=
{
const
C
OLLABORATION_TYPE
=
{
AUDIO
:
"audio"
,
CAMERA
:
"camera"
,
VIDEO
:
"video"
,
...
...
@@ -32,7 +32,7 @@ const CollaborationTypeKey = {
BOARD
:
"board"
,
};
const
COLLABORATION_TYPE
=
{
const
COLLABORATION_TYPE
_NUMBER
=
{
AUDIO
:
0
,
CAMERA
:
2
,
VIDEO
:
3
,
...
...
@@ -63,6 +63,12 @@ const InvitedFlag = {
INVITED
:
1
,
};
const
COLLABORATION_JOIN_TYPE
=
{
HOST
:
"0"
,
ATTENDEE
:
"1"
,
INVITED
:
"2"
,
};
const
messageSeperator
=
"<::split>"
;
const
DATA_MESSAGE_SCHEME
=
"::NOT_MESSAGE"
;
const
FINISH_ALL_COLLABORATION_SIGNAL
=
"::ALL_COLLABORATION_END"
;
...
...
public_new/js/common/native-bridge-datasource.js
View file @
e95209e0
...
...
@@ -65,17 +65,6 @@ NativeBridgeDataSource.getRoomList = function (roomType, keyWord) {
}
};
NativeBridgeDataSource
.
callGetRoomList
=
function
(
roomType
)
{
if
(
deviceInfo
.
isiOS
())
{
return
JSON
.
parse
(
callNativeApp
(
NATIVE_KEY_IOS
.
getRoomList
,
{
roomType
:
roomType
})
);
}
else
if
(
deviceInfo
.
isAndroid
())
{
//String形式をJsonに変更してReturn
return
JSON
.
parse
(
android
.
getRoomList
(
roomType
));
}
};
//ロカールDBからログインしたユーザのデータを取得する。
NativeBridgeDataSource
.
getMyInfo
=
function
()
{
if
(
deviceInfo
.
isiOS
())
{
...
...
@@ -406,13 +395,7 @@ NativeBridgeDataSource.getJoinCollaborationType = function () {
}
};
NativeBridgeDataSource
.
getCollaborationJoinFlg
=
function
()
{
if
(
deviceInfo
.
isiOS
())
{
return
callNativeApp
(
NATIVE_KEY_IOS
.
getCollaborationJoinFlg
,
{});
}
else
{
return
android
.
getCollaborationJoinFlg
();
}
};
NativeBridgeDataSource
.
getUserInfoList
=
function
(
shopMemberId
)
{
if
(
deviceInfo
.
isiOS
())
{
...
...
@@ -420,7 +403,7 @@ NativeBridgeDataSource.getUserInfoList = function (shopMemberId) {
shopMemberId
:
shopMemberId
,
});
}
else
{
return
android
.
getUserInfoList
(
collaborationInfo
.
userList
);
return
android
.
getUserInfoList
(
shopMemberId
);
}
};
...
...
public_new/js/common/native-bridge-delegate.js
View file @
e95209e0
...
...
@@ -46,7 +46,6 @@ NativeBridgeDelegate.createChatRoom = function (
screenFlag
,
isVoice
)
{
//todo android create room api
if
(
typeof
android
!=
"undefined"
)
{
android
.
createChatRoom
(
chatRoomType
,
...
...
@@ -97,9 +96,11 @@ NativeBridgeDelegate.joinCollaboration = function (
collaborationType
,
meetingId
=
0
)
{
const
collaborationTypeNumber
=
CHAT_UTIL
.
getCollaborationTypeNumber
(
collaborationType
);
if
(
deviceInfo
.
isiOS
())
{
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
({
collaborationType
:
collaborationType
,
collaborationType
:
collaborationType
Number
,
meetingId
:
meetingId
,
});
}
else
if
(
deviceInfo
.
isAndroid
())
{
...
...
@@ -110,7 +111,7 @@ NativeBridgeDelegate.joinCollaboration = function (
alert
(
getLocalizedString
(
"not_support_version"
));
return
;
}
android
.
joinCollaboration
(
collaborationType
,
meetingId
);
android
.
joinCollaboration
(
collaborationType
Number
,
meetingId
);
}
};
...
...
@@ -238,12 +239,13 @@ NativeBridgeDelegate.inviteCollaboration = function (
userIDList
,
collaborationType
)
{
const
collaborationNumber
=
CHAT_UTIL
.
getCollaborationTypeNumber
(
collaborationType
);
if
(
typeof
android
!=
"undefined"
)
{
android
.
inviteCollaboration
(
userIDList
,
collaboration
Type
);
android
.
inviteCollaboration
(
userIDList
,
collaboration
Number
);
}
else
{
webkit
.
messageHandlers
.
inviteCollaboration
.
postMessage
({
userIdList
:
userIDList
,
collaborationType
:
collaboration
Type
,
collaborationType
:
collaboration
Number
,
});
}
};
...
...
@@ -288,16 +290,17 @@ NativeBridgeDelegate.exitMeetingRoom = function () {
};
NativeBridgeDelegate
.
joinChangedCollaboration
=
function
(
joinC
ollaborationType
,
c
ollaborationType
,
meetingID
)
{
const
collaborationNumber
=
CHAT_UTIL
.
getCollaborationTypeNumber
(
collaborationType
);
if
(
deviceInfo
.
isiOS
())
{
webkit
.
messageHandlers
.
joinChangedCollaboration
.
postMessage
({
joinCollaborationType
:
joinCollaborationType
,
joinCollaborationType
:
collaborationNumber
,
meetingId
:
meetingID
,
});
}
else
if
(
deviceInfo
.
isAndroid
())
{
android
.
joinChangedCollaboration
(
joinCollaborationType
,
meetingID
);
android
.
joinChangedCollaboration
(
collaborationNumber
,
meetingID
);
}
};
...
...
@@ -313,8 +316,9 @@ NativeBridgeDelegate.setJoinCollaborationType = function (
type
,
androidVersion
)
{
const
collaborationNumber
=
CHAT_UTIL
.
getCollaborationTypeNumber
(
type
);
if
(
deviceInfo
.
isiOS
())
{
webkit
.
messageHandlers
.
setJoinCollaborationType
.
postMessage
(
type
);
webkit
.
messageHandlers
.
setJoinCollaborationType
.
postMessage
(
collaborationNumber
);
}
else
if
(
deviceInfo
.
isAndroid
())
{
if
(
type
==
COLLABORATION_TYPE
.
DOCUMENT
&&
...
...
@@ -323,7 +327,7 @@ NativeBridgeDelegate.setJoinCollaborationType = function (
alert
(
getLocalizedString
(
"not_support_version"
));
return
;
}
android
.
setJoinCollaborationType
(
type
);
android
.
setJoinCollaborationType
(
collaborationNumber
);
}
};
...
...
@@ -353,7 +357,6 @@ NativeBridgeDelegate.changeCollaboration = function (type, meetingID) {
}
};
var
ReverseDelegate
=
{};
/* reverse delegates */
// for android native call
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
e95209e0
...
...
@@ -59,7 +59,7 @@ var addCollaborationMessage = function (
insertDate
,
createdAt
)
{
const
collaborationType
=
messageInfo
[
2
]
;
const
collaborationType
=
CHAT_UTIL
.
getCollaborationType
(
messageInfo
[
2
])
;
const
meetingID
=
getMeetingID
(
collaborationType
,
messageInfo
);
const
userInCollaboration
=
JSON
.
parse
(
NativeBridgeDataSource
.
getUserInfoList
(
userID
)
...
...
@@ -87,10 +87,7 @@ var addCollaborationMessage = function (
};
var
getMeetingID
=
function
(
collaborationType
,
messageInfo
)
{
if
(
collaborationType
==
CHAT_UTIL
.
getCollaborationType
(
CollaborationTypeKey
.
DOCUMENT
)
)
{
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
return
messageInfo
[
3
];
}
else
{
return
0
;
...
...
public_new/js/utils/chat-util.js
View file @
e95209e0
...
...
@@ -108,35 +108,33 @@ function updateDuration() {
});
}
CHAT_UTIL
.
getCollaborationType
=
function
(
key
)
{
switch
(
key
)
{
case
C
ollaborationTypeKey
.
AUDIO
:
CHAT_UTIL
.
getCollaborationType
=
function
(
collaborationNumber
)
{
switch
(
collaborationNumber
)
{
case
C
OLLABORATION_TYPE_NUMBER
.
AUDIO
:
return
COLLABORATION_TYPE
.
AUDIO
;
case
C
ollaborationTypeKey
.
CAMERA
:
case
C
OLLABORATION_TYPE_NUMBER
.
CAMERA
:
return
COLLABORATION_TYPE
.
CAMERA
;
case
C
ollaborationTypeKey
.
VIDEO
:
case
C
OLLABORATION_TYPE_NUMBER
.
VIDEO
:
return
COLLABORATION_TYPE
.
VIDEO
;
case
C
ollaborationTypeKey
.
DOCUMENT
:
case
C
OLLABORATION_TYPE_NUMBER
.
DOCUMENT
:
return
COLLABORATION_TYPE
.
DOCUMENT
;
default
:
return
0
;
}
};
CHAT_UTIL
.
getCoviewTypeFromCollaborationType
=
function
(
joinCollaborationType
)
{
switch
(
joinCollaborationType
)
{
CHAT_UTIL
.
getCollaborationTypeNumber
=
function
(
collaborationType
)
{
switch
(
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
return
C
ollaborationTypeKey
.
AUDIO
;
return
C
OLLABORATION_TYPE_NUMBER
.
AUDIO
;
case
COLLABORATION_TYPE
.
CAMERA
:
return
C
ollaborationTypeKey
.
CAMERA
;
return
C
OLLABORATION_TYPE_NUMBER
.
CAMERA
;
case
COLLABORATION_TYPE
.
VIDEO
:
return
C
ollaborationTypeKey
.
VIDEO
;
return
C
OLLABORATION_TYPE_NUMBER
.
VIDEO
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
return
C
ollaborationTypeKey
.
DOCUMENT
;
return
C
OLLABORATION_TYPE_NUMBER
.
DOCUMENT
;
case
COLLABORATION_TYPE
.
BOARD
:
return
C
ollaborationTypeKey
.
BOARD
;
return
C
OLLABORATION_TYPE_NUMBER
.
BOARD
;
default
:
return
0
;
}
...
...
public_new/js/views/chats/chat-list.js
View file @
e95209e0
...
...
@@ -64,10 +64,10 @@ ChatList.refreshRoomList = function (roomType) {
Common
.
refreshForOffline
();
}
const
beforeRoomType
=
NativeBridgeDataSource
.
getBeforeRoomType
();
const
selectedRoomTypeInRoomList
=
NativeBridgeDataSource
.
getBeforeRoomType
();
if
(
beforeRoomType
!=
null
)
{
roomType
=
beforeRoomType
;
if
(
selectedRoomTypeInRoomList
!=
null
)
{
roomType
=
selectedRoomTypeInRoomList
;
NativeBridgeDelegate
.
clearBeforeRoomType
();
}
Common
.
showLoadingIndicator
();
...
...
public_new/js/views/chats/chat-room-message.js
View file @
e95209e0
...
...
@@ -111,8 +111,7 @@ ChatRoom.loadMessages = function (joinRoomID, joinRoomName) {
};
ChatRoom
.
configureRoomMenu
=
function
()
{
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
$
(
"#roomMenu"
).
removeClass
(
"none"
);
}
else
{
$
(
"#roomMenu"
).
addClass
(
"none"
);
...
...
@@ -235,7 +234,7 @@ ChatRoom.renderCollaborationMessage = function (message, isToday, isOtherYear) {
NativeBridgeDataSource
.
getUserInfoList
(
collaborationInfo
.
userList
)
);
const
displayUserList
=
ChatRoom
.
getDisplayUserList
(
userInCollaboration
);
const
meetingID
=
ChatRoom
.
getMeetingID
(
collaborationInfo
);
const
meetingID
=
ChatRoom
.
getMeetingID
(
collaborationInfo
.
meetingId
);
const
messageTime
=
CHAT_UTIL
.
formatDate
(
message
.
insertDate
);
const
createdAtYear
=
message
.
insertDate
.
substring
(
0
,
4
)
+
getLocalizedString
(
"year"
)
+
" "
;
...
...
@@ -246,6 +245,7 @@ ChatRoom.renderCollaborationMessage = function (message, isToday, isOtherYear) {
userCount
:
userInCollaboration
.
length
,
userList
:
displayUserList
,
insertDate
:
message
.
insertDate
,
// TODO: peacekim:: should check collaborationInfo.collaborationType is string or number
collaborationType
:
collaborationInfo
.
collaborationType
,
meetingId
:
meetingID
,
isToday
:
isToday
,
...
...
@@ -261,9 +261,9 @@ ChatRoom.renderCollaborationMessage = function (message, isToday, isOtherYear) {
:
html
;
};
ChatRoom
.
getMeetingID
=
function
(
collaborationInfo
)
{
if
(
typeof
collaborationInfo
.
meetingId
!=
"undefined"
)
{
return
collaborationInfo
.
meetingId
;
ChatRoom
.
getMeetingID
=
function
(
meetingID
)
{
if
(
typeof
meetingID
!=
"undefined"
)
{
return
meetingID
;
}
else
{
return
0
;
}
...
...
public_new/js/views/collaboration/collaboration-add-user.js
View file @
e95209e0
...
...
@@ -295,9 +295,7 @@ CollaborationUI.bindAddUserButton = function (selectedUsers) {
Common
.
showLoadingIndicator
();
let
userIDList
=
selectedUsers
.
map
((
user
)
=>
user
.
shopMemberId
);
const
commaJoinedUserIDList
=
userIDList
.
join
(
","
);
const
collaborationType
=
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
const
collaborationType
=
globalUserInfo
.
collaborationType
;
NativeBridgeDelegate
.
inviteCollaboration
(
commaJoinedUserIDList
,
...
...
public_new/js/views/collaboration/collaboration.js
View file @
e95209e0
...
...
@@ -20,6 +20,8 @@ document.addEventListener("DOMContentLoaded", function () {
CollaborationUI
.
bindInviteButton
();
CollaborationUI
.
bindAddUserButton
();
CollaborationUI
.
displayAddUserButtonIfNeeded
();
});
/*********************************
...
...
@@ -166,7 +168,7 @@ CollaborationUI.refreshForOffline = function () {
NativeBridgeDelegate
.
finishCollaboration
();
if
(
collaborationJoinFlg
!=
"2"
)
{
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
NativeBridgeDelegate
.
joinRoom
(
roomInfo
.
roomID
,
roomInfo
.
name
);
}
else
{
NativeBridgeDelegate
.
openCommunicationHome
();
...
...
@@ -180,3 +182,9 @@ CollaborationUI.showLoadingIndicator = function () {
CollaborationUI
.
hideLoadingIndicator
=
function
()
{
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
};
CollaborationUI
.
displayAddUserButtonIfNeeded
=
function
()
{
if
(
roomInfo
.
roomType
==
ChatRoomType
.
DM
)
{
$
(
".add_user_btn"
).
removeClass
(
"none"
);
}
};
public_new/js/views/collaboration/fermi-web-socket-bridge.js
View file @
e95209e0
...
...
@@ -9,6 +9,7 @@ FermiWebSocketBridge.requestHostChange = function (loginID) {
FermiWebSocketBridge
.
shareFileHost
=
function
(
collaborationType
)
{
fw
.
sendToMsg
(
"others"
,
"SHARE_FILE_HOST"
,
{
// TODO: Peacekim check collaboration type as coviewType
collaborationType
:
collaborationType
,
});
};
...
...
@@ -46,7 +47,7 @@ FermiWebSocketBridge.hostRequestDone = function (hostID) {
FermiWebSocketBridge
.
getCollaborationTypeResponse
=
function
(
loginID
)
{
fw
.
sendToMsg
(
"others"
,
"GET_COLLABORATION_TYPE_RESPONSE"
,
{
loginId
:
loginID
,
collaborationType
:
joinC
ollaborationType
,
collaborationType
:
globalUserInfo
.
c
ollaborationType
,
newMeetingId
:
meetingID
,
});
};
...
...
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
View file @
e95209e0
...
...
@@ -27,7 +27,7 @@ FermiWebSocketMessageHandler.handleMessagesToHost = function (data) {
FermiWebSocketMessageHandler
.
getCollaborationType
(
data
);
break
;
case
"SHARE_FILE_HOST"
:
if
(
joinC
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
FermiWebSocketMessageHandler
.
shareFileHost
();
}
break
;
...
...
@@ -43,7 +43,7 @@ FermiWebSocketMessageHandler.handleMessagesToSelf = function (data) {
FermiWebSocketMessageHandler
.
hostChangeRequest
();
break
;
case
"PIP_END_REQUEST"
:
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
FermiWebSocketMessageHandler
.
pipEndRequest
();
}
break
;
...
...
@@ -61,7 +61,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function () {
FermiWebSocketMessageHandler
.
changeCollaboration
(
data
);
break
;
case
"SHARE_FILE"
:
if
(
joinC
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
FermiWebSocketMessageHandler
.
shareFile
();
}
break
;
...
...
@@ -69,7 +69,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function () {
FermiWebSocketMessageHandler
.
apiSendOwnerChangeComplete
();
break
;
case
"API_SEND_OWNER_CHANGE_CONFIRM"
:
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
FermiWebSocketMessageHandler
.
apiSendOwnerChangeConfirm
();
}
break
;
...
...
@@ -83,7 +83,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function () {
FermiWebSocketMessageHandler
.
hostRequestReject
(
data
);
break
;
case
"API_WELCOME"
:
if
(
collaborationJoinFlg
==
"2"
)
{
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
FermiWebSocketMessageHandler
.
apiWelcome
();
}
break
;
...
...
@@ -95,7 +95,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function () {
// CHANGE_COLLABORATION
FermiWebSocketMessageHandler
.
changeCollaboration
=
function
(
data
)
{
const
newMeetingID
=
data
.
payload
.
newMeetingId
;
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
NativeBridgeDelegate
.
finishPIPMode
(
true
);
...
...
@@ -110,15 +110,15 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
(
data
.
payload
.
collaborationType
);
joinMeetingId
=
newMeetingID
;
updateCollaborationUI
(
joinC
ollaborationType
);
globalUserInfo
.
meetingID
=
newMeetingID
;
updateCollaborationUI
(
globalUserInfo
.
c
ollaborationType
);
NativeBridgeDelegate
.
joinChangedCollaboration
(
joinC
ollaborationType
,
globalUserInfo
.
c
ollaborationType
,
newMeetingID
);
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
joinMeetingRoom
(
newMeetingID
);
}
};
...
...
@@ -126,14 +126,14 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
// SHARE_FILE
FermiWebSocketMessageHandler
.
shareFile
=
function
()
{
updateCollaborationUI
(
COLLABORATION_TYPE
.
CAMERA
);
joinC
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
globalUserInfo
.
c
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
FermiWebSocketBridge
.
shareFileHost
(
COLLABORATION_TYPE
.
CAMERA
);
};
// SHARE_FILE_HOST
FermiWebSocketMessageHandler
.
shareFileHost
=
function
()
{
updateCollaborationUI
(
COLLABORATION_TYPE
.
CAMERA
);
joinC
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
globalUserInfo
.
c
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
};
// CAPTURE_REQUEST
...
...
@@ -173,7 +173,7 @@ FermiWebSocketMessageHandler.hostChangeResponse = function (data) {
if
(
isAndroid
&&
!
isAble
&&
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
// 対象ユーザの端末バージョンでは文書協業が利用できません。
...
...
@@ -265,15 +265,15 @@ FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
(
data
.
payload
.
collaborationType
);
joinMeetingId
=
data
.
payload
.
newMeetingId
;
updateCollaborationUI
(
joinC
ollaborationType
);
globalUserInfo
.
meetingID
=
data
.
payload
.
newMeetingId
;
updateCollaborationUI
(
globalUserInfo
.
c
ollaborationType
);
NativeBridgeDelegate
.
joinChangedCollaboration
(
joinC
ollaborationType
,
globalUserInfo
.
c
ollaborationType
,
data
.
payload
.
newMeetingId
);
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
joinMeetingRoom
(
data
.
payload
.
newMeetingId
);
}
};
...
...
@@ -281,8 +281,7 @@ FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
// API_WELCOME
FermiWebSocketMessageHandler
.
apiWelcome
=
function
()
{
FermiWebSocketBridge
.
getCollaborationType
();
collaborationJoinFlg
=
"1"
;
isInvited
=
InvitedFlag
.
INVITED
;
globalUserInfo
.
joinType
=
COLLABORATION_JOIN_TYPE
.
ATTENDEE
;
};
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
=
function
(
...
...
@@ -295,8 +294,8 @@ FermiWebSocketMessageHandler.updateJoinChangeCollaboration = function (
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
alert
(
getLocalizedString
(
"not_support_version"
));
joinC
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
globalUserInfo
.
c
ollaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
}
else
{
joinC
ollaborationType
=
collaborationType
;
globalUserInfo
.
c
ollaborationType
=
collaborationType
;
}
};
public_new/js/views/collaboration/share-bind-button-action.js
View file @
e95209e0
...
...
@@ -121,7 +121,7 @@ function mainManRecordWithCollaboration(action, url, callback) {
formData
.
append
(
"fileData"
,
blob
,
uploadFileName
);
formData
.
append
(
"sid"
,
globalUserInfo
.
sid
);
formData
.
append
(
"roomId"
,
globalUserInfo
.
roomId
);
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
formData
.
append
(
"archiveType"
,
1
);
}
else
{
formData
.
append
(
"archiveType"
,
2
);
...
...
public_new/js/views/collaboration/share-event-listener.js
View file @
e95209e0
...
...
@@ -5,7 +5,7 @@ CoviewBridge.bindReadyEvent = function () {
coview_api
.
addEventListener
(
"ready"
,
function
()
{
CoviewBridge
.
addLoginId
(
globalUserInfo
.
loginId
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
updateCollaborationUI
(
joinC
ollaborationType
);
updateCollaborationUI
(
globalUserInfo
.
c
ollaborationType
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
FermiWebSocketMessageHandler
.
bindWebSocketMessage
();
});
...
...
@@ -54,13 +54,13 @@ CoviewBridge.bindAllByeEvent = function () {
if
(
deviceInfo
.
isAndroid
())
{
android
.
setExitHostAlert
();
}
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
}
if
(
isInvited
==
InvitedFlag
.
NONE
)
{
NativeBridgeDelegate
.
joinRoom
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
}
else
{
if
(
globalUserInfo
.
isInvited
())
{
NativeBridgeDelegate
.
openCommunicationHome
();
}
else
{
NativeBridgeDelegate
.
joinRoom
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
}
// TODO: peacekim:: check not to need this method for android
if
(
deviceInfo
.
isiOS
())
{
...
...
@@ -81,7 +81,7 @@ CoviewBridge.bindDestroyEvent = function () {
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
Coview
_
exitCollaboration
();
Coview
Bridge
.
exitCollaboration
();
CollaborationUI
.
hideLoadingIndicator
();
});
};
...
...
@@ -89,47 +89,57 @@ CoviewBridge.bindDestroyEvent = function () {
CoviewBridge
.
bindMessageEvent
=
function
()
{
let
meetingId
;
coview_api
.
addEventListener
(
"message"
,
async
function
(
event
,
json
)
{
console
.
log
(
"peacekim:: +++ addEventListener"
,
json
);
console
.
log
(
"peacekim:: processMessage api = "
,
json
.
api
)
;
if
(
isLeaved
)
return
;
if
(
globalUserInfo
.
isLeaved
)
{
return
;
}
let
loginIdList
=
new
Array
();
switch
(
json
.
api
)
{
case
"LoginResponse"
:
if
(
globalUserInfo
.
co
WorkType
==
CollaborationTypeKey
.
DOCUMENT
)
{
if
(
globalUserInfo
.
co
llaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
isDocument
=
true
;
globalUserInfo
.
co
WorkType
=
CollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
co
llaborationType
=
COLLABORATION_TYPE
.
AUDIO
;
}
if
(
globalUserInfo
.
co
WorkType
==
CollaborationTypeKey
.
BOARD
)
{
if
(
globalUserInfo
.
co
llaborationType
==
COLLABORATION_TYPE
.
BOARD
)
{
isBoard
=
true
;
globalUserInfo
.
co
WorkType
=
CollaborationTypeKey
.
AUDIO
;
globalUserInfo
.
co
llaborationType
=
COLLABORATION_TYPE
.
AUDIO
;
}
hostSearchInterval
();
if
(
collaborationJoinFlg
==
"1"
)
{
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
if
(
isDocument
)
{
NativeBridgeDelegate
.
startContentView
();
}
}
else
if
(
collaborationJoinFlg
==
"0"
)
{
let
deleteRoomResult
=
JSON
.
parse
(
await
deleteRoomApi
(
globalUserInfo
.
roomId
)
);
if
(
deleteRoomResult
.
resultCode
==
200
)
{
waitMillisecond
(
3000
);
}
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
if
(
isDocument
)
{
meetingId
=
NativeBridgeDataSource
.
createContentView
();
joinMeetingId
=
meetingId
;
}
}
else
if
(
collaborationJoinFlg
==
"2"
)
{
isInvited
=
InvitedFlag
.
INVITED
;
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
switch
(
globalUserInfo
.
joinType
)
{
case
COLLABORATION_JOIN_TYPE
.
ATTENDEE
:
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
if
(
isDocument
)
{
NativeBridgeDelegate
.
startContentView
();
}
break
;
case
COLLABORATION_JOIN_TYPE
.
HOST
:
let
deleteRoomResult
=
JSON
.
parse
(
await
deleteRoomApi
(
globalUserInfo
.
roomId
)
);
if
(
deleteRoomResult
.
resultCode
==
200
)
{
waitMillisecond
(
3000
);
}
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
if
(
isDocument
)
{
meetingId
=
NativeBridgeDataSource
.
createContentView
();
globalUserInfo
.
meetingID
=
meetingId
;
}
break
;
case
COLLABORATION_JOIN_TYPE
.
INVITED
:
coview_api
.
JoinRoom
(
globalUserInfo
.
roomId
,
globalUserInfo
.
coWorkType
);
break
;
default
:
break
;
}
moveToVideoShareArea
();
break
;
case
"CreateRoomResponse"
:
if
(
json
.
resultCode
==
200
)
{
...
...
@@ -140,7 +150,9 @@ CoviewBridge.bindMessageEvent = function () {
messageSeperator
+
MessageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
CollaborationTypeKey
.
DOCUMENT
)
+
CHAT_UTIL
.
getCollaborationTypeNumber
(
COLLABORATION_TYPE
.
DOCUMENT
)
+
messageSeperator
+
meetingId
;
}
else
if
(
isBoard
)
{
...
...
@@ -156,7 +168,9 @@ CoviewBridge.bindMessageEvent = function () {
messageSeperator
+
MessageType
.
COMMUNICATIONSTART
+
messageSeperator
+
CHAT_UTIL
.
getCollaborationType
(
globalUserInfo
.
coWorkType
);
CHAT_UTIL
.
getCollaborationTypeNumber
(
globalUserInfo
.
collaborationType
);
}
CHAT_SOCKET
.
emitCreateMessage
(
coviewInviteMessage
,
0
);
}
...
...
@@ -178,7 +192,6 @@ CoviewBridge.bindMessageEvent = function () {
loginIdList
.
push
(
key
);
}
CollaborationUI
.
refreshJoinedCollaboration
(
loginIdList
);
}
else
{
}
break
;
case
"RoomMemberJoinedEvent"
:
...
...
@@ -199,12 +212,11 @@ CoviewBridge.bindMessageEvent = function () {
console
.
log
(
"peacekim:: t2 consoleLog"
,
json
);
break
;
case
"fileChange"
:
if
(
joinC
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
break
;
}
LoadMobileShareFile
(
json
.
fileName
);
backgroundFileName
=
json
.
fileName
;
console
.
log
(
"peacekim:: fileChange"
,
json
);
break
;
case
"ReceiveMediaResponse"
:
if
(
isBoard
&&
g_isMainMan
)
{
...
...
@@ -251,10 +263,10 @@ function hostSearchInterval() {
if
(
g_isMainMan
)
{
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginID
).
addClass
(
"host"
);
$
(
".host_contents"
).
removeClass
(
"none"
);
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
removeClass
(
"none"
);
}
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
$
(
".video_contents_host"
).
removeClass
(
"none"
);
$
(
".video_contents_user"
).
addClass
(
"none"
);
}
...
...
@@ -262,10 +274,10 @@ function hostSearchInterval() {
}
else
{
$
(
"#collaboration_user_"
+
currentUserInfo
.
loginID
).
removeClass
(
"host"
);
$
(
".host_contents"
).
addClass
(
"none"
);
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
$
(
".photo_select_button"
).
addClass
(
"none"
);
}
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
VIDEO
)
{
$
(
".video_contents_user"
).
removeClass
(
"none"
);
$
(
".video_contents_host"
).
addClass
(
"none"
);
}
...
...
@@ -410,35 +422,38 @@ function getReplacedLoginId(loginId) {
return
loginId
.
replaceAll
(
globalUserInfo
.
shopName
+
"_"
,
""
);
}
function
Coview_exitCollaboration
()
{
CoviewBridge
.
exitCollaboration
=
function
()
{
CollaborationFeature
.
disableScrollLock
();
if
(
g_isMainMan
)
{
CHAT_SOCKET
.
emitCollaborationFinishMessage
();
}
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
}
if
(
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
recordStop
(
Coview
_
finishCollaboration
);
recordStop
(
Coview
Bridge
.
finishCollaboration
);
}
else
{
Coview
_
finishCollaboration
();
Coview
Bridge
.
finishCollaboration
();
}
}
}
;
function
Coview_finishCollaboration
()
{
CoviewBridge
.
finishCollaboration
=
function
()
{
clearInterval
(
timeInterval
);
coview_api
.
LeaveRoom
();
NativeBridgeDelegate
.
finishCollaboration
(
true
);
if
(
coview_api
.
getRoomUsers
())
{
NativeBridgeDelegate
.
finishCollaboration
();
}
isLeaved
=
true
;
if
(
isInvited
==
InvitedFlag
.
NONE
)
{
NativeBridgeDelegate
.
joinRoom
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
}
else
{
globalUserInfo
.
isLeaved
=
true
;
if
(
globalUserInfo
.
isInvited
())
{
NativeBridgeDelegate
.
openCommunicationHome
();
}
else
{
NativeBridgeDelegate
.
joinRoom
(
roomInfo
.
roomID
,
roomInfo
.
roomName
);
}
}
}
;
// Display User List
CollaborationUI
.
refreshJoinedCollaboration
=
function
(
loginIDList
)
{
...
...
public_new/js/views/collaboration/share.js
View file @
e95209e0
...
...
@@ -4,7 +4,6 @@
let
coview_api
=
new
CoviewApi
();
var
isDocument
=
false
;
var
isBoard
=
false
;
let
isLeaved
=
false
;
let
timeInterval
=
null
;
var
backgroundFileName
;
var
isIos
;
...
...
@@ -33,7 +32,7 @@ document.addEventListener("DOMContentLoaded", function () {
function
changeCollaboration
(
collaborationType
)
{
recordStop
(
function
()
{
var
newMeetingId
=
0
;
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
}
NativeBridgeDelegate
.
setJoinCollaborationType
(
...
...
@@ -41,7 +40,7 @@ function changeCollaboration(collaborationType) {
androidVersion
);
joinC
ollaborationType
=
collaborationType
;
globalUserInfo
.
c
ollaborationType
=
collaborationType
;
updateCollaborationUI
(
collaborationType
);
switch
(
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
...
...
@@ -71,14 +70,12 @@ function changeCollaboration(collaborationType) {
NativeBridgeDelegate
.
changeCollaboration
(
collaborationType
,
newMeetingId
);
joinMeetingId
=
newMeetingId
;
globalUserInfo
.
meetingID
=
newMeetingId
;
FermiWebSocketBridge
.
changeCollaboration
();
});
}
async
function
updateCollaborationUI
(
collaborationType
)
{
$
(
"#coviewEraserCtrBtn"
).
click
();
if
(
$
(
".user_btn"
).
hasClass
(
"hide"
))
{
...
...
@@ -88,10 +85,7 @@ async function updateCollaborationUI(collaborationType) {
$
(
".menu_btn"
).
click
();
}
const
roomType
=
NativeBridgeDataSource
.
getRoomType
();
if
(
roomType
==
ChatRoomType
.
DM
)
{
$
(
".add_user_btn"
).
removeClass
(
"none"
);
}
CollaborationUI
.
displayAddUserButtonIfNeeded
();
$
(
"link[href='./css/collaboration_board.css']"
).
remove
();
...
...
@@ -127,7 +121,7 @@ async function updateCollaborationUI(collaborationType) {
// call from modal_collabo_host_request.html
function
applyForHostChange
()
{
if
(
joinC
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
globalUserInfo
.
c
ollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
&&
deviceInfo
.
isAndroid
()
)
{
...
...
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