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