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
42fe068a
Commit
42fe068a
authored
Jul 08, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: assamble as native bridge
parent
a9049c58
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
109 additions
and
217 deletions
+109
-217
public_new/archive.html
+3
-7
public_new/archive_detail.html
+2
-7
public_new/chat.html
+4
-4
public_new/chat_add_user.html
+2
-7
public_new/chat_add_user_confirm.html
+3
-7
public_new/chat_change_room_name.html
+3
-7
public_new/chat_make_room.html
+4
-7
public_new/chat_make_room_confirm.html
+2
-7
public_new/chat_room.html
+4
-4
public_new/collaboration.html
+7
-5
public_new/collaboration_documents.html
+2
-7
public_new/collaboration_picture.html
+4
-4
public_new/collaboration_video.html
+4
-4
public_new/collaboration_voice.html
+4
-4
public_new/collaboration_whiteboard.html
+4
-4
public_new/contact.html
+3
-7
public_new/js/chat-db-foriOS.js
+0
-28
public_new/js/chat-ui-clickEvents.js
+1
-5
public_new/js/chat-ui-collaboration.js
+2
-38
public_new/js/chat-ui.js
+0
-0
public_new/js/collaboration.js
+0
-2
public_new/js/common/NativeBridge.js
+18
-11
public_new/js/share.js
+26
-29
public_new/js/sockets/chat-websocket-refresh-group-list.js
+2
-1
public_new/js/sockets/chat-websocket.js
+2
-8
public_new/modal_chat_menu.html
+1
-1
public_new/template/template_open_collaboration_message.html
+1
-1
public_new/template/template_room_list.html
+1
-1
No files found.
public_new/archive.html
View file @
42fe068a
...
...
@@ -154,13 +154,9 @@
let
IS_ONLINE
=
false
;
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/archive_detail.html
View file @
42fe068a
...
...
@@ -203,13 +203,8 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat.html
View file @
42fe068a
...
...
@@ -134,13 +134,13 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
saveSelectedUserList
(
""
);
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
webkit
.
messageHandlers
.
saveSelectedUserList
.
postMessage
(
""
);
}
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
...
...
public_new/chat_add_user.html
View file @
42fe068a
...
...
@@ -165,13 +165,8 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat_add_user_confirm.html
View file @
42fe068a
...
...
@@ -92,13 +92,9 @@
let
PLATFORM
=
''
;
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat_change_room_name.html
View file @
42fe068a
...
...
@@ -92,13 +92,9 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
let
roomId
=
0
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat_make_room.html
View file @
42fe068a
...
...
@@ -165,13 +165,10 @@
let
PLATFORM
=
''
;
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat_make_room_confirm.html
View file @
42fe068a
...
...
@@ -101,13 +101,8 @@
let
IS_MOBILE
=
true
;
let
IS_ONLINE
=
false
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
...
...
public_new/chat_room.html
View file @
42fe068a
...
...
@@ -198,14 +198,14 @@
$
(
"#chatMenuModal"
).
load
(
"./modal_chat_menu.html"
);
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
android
.
saveSelectedUserList
(
""
);
androidVersion
=
android
.
getAndroidVersion
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
webkit
.
messageHandlers
.
saveSelectedUserList
.
postMessage
(
""
);
}
...
...
public_new/collaboration.html
View file @
42fe068a
...
...
@@ -156,6 +156,7 @@
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/collaboration.js"
></script>
<script
src=
"https://biztaskyell.abookcloud.com/coview_api.js"
></script>
<script
src=
"./js/share.js"
></script>
<script>
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
...
...
@@ -180,13 +181,12 @@
let
joinMeetingId
=
0
;
let
androidVersion
=
0
;
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
roomType
=
android
.
getRoomType
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
roomType
=
CHAT_DB
.
getRoomType
();
}
...
...
@@ -227,7 +227,9 @@
androidVersion
=
android
.
getAndroidVersion
();
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
alert
(
getLocalizedString
(
'not_support_version'
));
android
.
openCommunicationHome
();
if
(
typeof
android
!=
"undefined"
)
{
NativeBridge
.
openCommunicationHome
();
}
}
}
...
...
public_new/collaboration_documents.html
View file @
42fe068a
...
...
@@ -119,13 +119,8 @@
let
IS_ONLINE
=
false
;
let
collaborationJoinFlg
=
0
;
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
startPipMode
()
{
if
(
typeof
(
android
)
!=
"undefined"
)
{
...
...
public_new/collaboration_picture.html
View file @
42fe068a
...
...
@@ -160,6 +160,7 @@
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/collaboration.js"
></script>
<script
src=
"https://biztaskyell.abookcloud.com/coview_api.js"
></script>
<script
src=
"./js/share.js"
></script>
<script>
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
...
...
@@ -180,13 +181,12 @@
let
collaborationJoinFlg
=
0
;
let
roomType
;
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
roomType
=
android
.
getRoomType
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
roomType
=
CHAT_DB
.
getRoomType
();
}
...
...
public_new/collaboration_video.html
View file @
42fe068a
...
...
@@ -150,6 +150,7 @@
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/collaboration.js"
></script>
<script
src=
"https://biztaskyell.abookcloud.com/coview_api.js"
></script>
<script
src=
"./js/share.js"
></script>
</body>
<script>
...
...
@@ -171,13 +172,12 @@
let
collaborationJoinFlg
=
0
;
let
roomType
;
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
roomType
=
android
.
getRoomType
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
roomType
=
CHAT_DB
.
getRoomType
();
}
...
...
public_new/collaboration_voice.html
View file @
42fe068a
...
...
@@ -95,6 +95,7 @@
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/collaboration.js"
></script>
<script
src=
"https://biztaskyell.abookcloud.com/coview_api.js"
></script>
<script
src=
"./js/share.js"
></script>
<script>
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
...
...
@@ -114,13 +115,12 @@
let
collaborationJoinFlg
=
0
;
let
roomType
;
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
roomType
=
android
.
getRoomType
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
roomType
=
CHAT_DB
.
getRoomType
();
}
...
...
public_new/collaboration_whiteboard.html
View file @
42fe068a
...
...
@@ -152,6 +152,7 @@
<script
src=
"./js/chat-ui.js"
></script>
<script
src=
"./js/collaboration.js"
></script>
<script
src=
"https://biztaskyell.abookcloud.com/coview_api.js"
></script>
<script
src=
"./js/share.js"
></script>
<script>
$
(
"#footer_collabo"
).
load
(
"./footer_collabo.html"
);
...
...
@@ -172,13 +173,12 @@
let
collaborationJoinFlg
=
0
;
let
roomType
;
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
roomType
=
android
.
getRoomType
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
roomType
=
CHAT_DB
.
getRoomType
();
}
...
...
public_new/contact.html
View file @
42fe068a
...
...
@@ -215,13 +215,9 @@
let
IS_ONLINE
=
false
;
$
(
"#loadingArea"
).
load
(
"./loading.html"
);
if
(
typeof
(
android
)
!=
"undefined"
)
{
android
.
getLoginParameter
();
android
.
getGlobalParameter
();
}
else
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
webkit
.
messageHandlers
.
getGlobalParameter
.
postMessage
({});
}
NativeBridge
.
getLoginParameter
();
NativeBridge
.
getGlobalParameter
();
function
getGlobalParam
(
chatServerUrl
,
cmsServerUrl
,
platform
,
isMobile
,
isOnline
)
{
CHAT_SERVER_URL
=
chatServerUrl
;
CMS_SERVER_URL
=
cmsServerUrl
;
...
...
public_new/js/chat-db-foriOS.js
View file @
42fe068a
...
...
@@ -58,34 +58,6 @@ CHAT_DB.addFavoriteUser = function (shopMemberId) {
}
};
CHAT_DB
.
removeFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
removeFavoriteGroup
,
{
groupId
:
groupId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
addFavoriteGroup
=
function
(
groupId
)
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
var
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteGroup
,
{
groupId
:
groupId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
CHAT_DB
.
getCollaborationJoinFlg
=
function
()
{
// Androidは実装不要
if
(
CHAT_UTIL
.
isIOS
())
{
...
...
public_new/js/chat-ui-clickEvents.js
View file @
42fe068a
...
...
@@ -95,11 +95,7 @@ $("#room-search").on("input", function (event) {
socket
.
emit
(
"roomSearch"
,
encodeURIComponent
(
$
(
"#room-search"
).
val
()));
}
else
{
if
(
IS_ONLINE
==
"true"
)
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
updateRoomList
();
}
else
{
webkit
.
messageHandlers
.
updateRoomList
.
postMessage
({});
}
NativeBridge
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
}
...
...
public_new/js/chat-ui-collaboration.js
View file @
42fe068a
CHAT_UI
.
joinCollaboration
=
function
(
collaborationType
,
meetingId
=
0
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
({
collaborationType
:
collaborationType
,
meetingId
:
meetingId
,
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
&&
androidVersion
<
ANDROID_SDK_VERSION
.
O
)
{
alert
(
getLocalizedString
(
"not_support_version"
));
return
;
}
android
.
joinCollaboration
(
collaborationType
,
meetingId
);
}
};
CHAT_UI
.
startCollaboration
=
function
(
collaborationType
)
{
if
(
CHAT_UTIL
.
isAndroid
())
{
if
(
...
...
@@ -122,18 +104,7 @@ CHAT_UI.refreshMyGroupForAddUserInCollaboration = function () {
TemplateURL
.
ADD_USER_GROUP_USER_LIST_IN_COLLABORATION
);
if
(
IS_ONLINE
==
"true"
)
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
updateMyInfo
();
android
.
updateGroupUser
();
android
.
updateFavorite
();
}
else
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
(
"0"
);
webkit
.
messageHandlers
.
updateMyInfo
.
postMessage
({});
webkit
.
messageHandlers
.
updateGroupUser
.
postMessage
({});
webkit
.
messageHandlers
.
updateFavorite
.
postMessage
({});
}
}
NativeBridge
.
updateContactInfo
();
//お気に入りグループ取得。
var
favoriteGroupList
=
CHAT_DB
.
getFavoriteGroups
();
...
...
@@ -192,14 +163,7 @@ CHAT_UI.refreshAllGroupForAddUserInCollaboration = function (paramGroupId) {
$
(
"#tabAllGroupOnAddUserInCollaboration"
).
prop
(
"checked"
,
true
);
//オンライン状態であればサーバから情報更新。
if
(
IS_ONLINE
==
"true"
)
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
updateGroupUser
();
}
else
{
webkit
.
messageHandlers
.
updateGroupInfo
.
postMessage
(
groupId
);
}
}
NativeBridge
.
updateGroupInfo
(
groupId
);
//画面エリアを初期化。
$
(
"#parentGroupBtnForAddUserInCollaboration"
).
off
();
...
...
public_new/js/chat-ui.js
View file @
42fe068a
This diff is collapsed.
Click to expand it.
public_new/js/collaboration.js
View file @
42fe068a
includeJs
(
"./js/share.js"
);
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
no_scroll
();
...
...
public_new/js/common/NativeBridge.js
View file @
42fe068a
...
...
@@ -24,7 +24,7 @@ NativeBridge.openCommunicationHome = function () {
}
};
NativeBridge
.
joinRoom
=
function
(
roomID
,
roomName
)
{
NativeBridge
.
joinRoom
=
function
(
roomID
,
roomName
=
""
)
{
if
(
typeof
android
!=
"undefined"
)
{
try
{
android
.
joinRoom
(
roomID
,
roomName
);
...
...
@@ -50,7 +50,7 @@ NativeBridge.createChatRoom = function (
if
(
typeof
android
!=
"undefined"
)
{
android
.
createChatRoom
(
chatRoomType
,
userIDList
.
join
(
","
)
,
userIDList
,
newRoomName
,
screenFlag
,
isVoice
...
...
@@ -58,7 +58,7 @@ NativeBridge.createChatRoom = function (
}
else
{
webkit
.
messageHandlers
.
createChatRoom
.
postMessage
({
roomType
:
chatRoomType
,
userIdList
:
userIDList
.
join
(
","
)
,
userIdList
:
userIDList
,
roomName
:
newRoomName
,
screenFlag
:
screenFlag
,
isVoice
:
isVoice
,
...
...
@@ -105,6 +105,21 @@ NativeBridge.removeFavoriteGroup = function (groupID) {
}
};
NativeBridge
.
addFavoriteGroup
=
function
(
groupID
)
{
if
(
typeof
android
!=
"undefined"
)
{
return
android
.
addFavoriteGroup
(
groupID
);
}
else
{
const
result
=
callNativeApp
(
NATIVE_KEY_IOS
.
addFavoriteGroup
,
{
groupId
:
groupId
,
});
if
(
result
==
"true"
)
{
return
true
;
}
else
{
return
false
;
}
}
};
NativeBridge
.
joinCollaboration
=
function
(
collaborationType
,
meetingId
=
0
)
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
({
...
...
@@ -123,14 +138,6 @@ NativeBridge.joinCollaboration = function (collaborationType, meetingId = 0) {
}
};
NativeBridge
.
joinRoom
=
function
()
{
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
joinRoom
.
postMessage
({
roomId
:
roomId
});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
joinRoom
(
roomId
,
""
);
}
};
NativeBridge
.
inviteUsers
=
function
(
userIDList
)
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
inviteUsers
(
userIDList
,
false
);
...
...
public_new/js/share.js
View file @
42fe068a
...
...
@@ -139,7 +139,7 @@ document.addEventListener("DOMContentLoaded", function () {
android
.
finishPip
();
$
(
".pip_indicator"
).
addClass
(
"none"
);
}
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
500
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
500
));
updateCanvasSize
();
}
...
...
@@ -232,11 +232,14 @@ document.addEventListener("DOMContentLoaded", function () {
fw
.
sendToMsg
(
"others"
,
"PIP_END_REQUEST"
,
{
loginId
:
getFermiLoginId
(
data
.
payload
.
loginId
),
});
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
500
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
500
));
Coview_changeHost
(
getFermiLoginId
(
data
.
payload
.
loginId
));
}
}
else
if
(
data
.
type
===
"PIP_END_REQUEST"
)
{
if
(
data
.
payload
.
loginId
==
globalUserInfo
.
loginId
&&
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
data
.
payload
.
loginId
==
globalUserInfo
.
loginId
&&
joinCollaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
finishPip
();
$
(
".pip_indicator"
).
addClass
(
"none"
);
...
...
@@ -258,7 +261,7 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
else
if
(
data
.
type
===
"API_SEND_OWNER_CHANGE_CONFIRM"
)
{
if
(
joinCollaborationType
==
COLLABORATION_TYPE
.
CAMERA
)
{
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
500
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
500
));
removeOldLocalVideo
(
g_localStream
);
}
}
else
if
(
data
.
type
===
"CHANGE_HOST_APPLY"
)
{
...
...
@@ -278,7 +281,7 @@ document.addEventListener("DOMContentLoaded", function () {
HostRequestFlag
.
DOING
);
}
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
500
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
500
));
if
(
g_isMainMan
)
{
if
(
confirm
(
...
...
@@ -401,16 +404,12 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
if
(
isInvited
==
InvitedFlag
.
NONE
)
{
CHAT_UI
.
joinRoom
(
NativeBridge
.
joinRoom
(
CHAT
.
globalLoginParameter
.
roomId
,
CHAT
.
globalLoginParameter
.
name
);
}
else
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
openCommunicationHome
();
}
else
{
webkit
.
messageHandlers
.
openCommunicationHome
.
postMessage
({});
}
NativeBridge
.
openCommunicationHome
();
}
console
.
log
(
"=============> HOST BYE : share hostbye"
);
if
(
CHAT_UTIL
.
isIOS
())
{
...
...
@@ -465,9 +464,11 @@ document.addEventListener("DOMContentLoaded", function () {
}
}
}
else
if
(
collaborationJoinFlg
==
"0"
)
{
let
deleteRoomResult
=
JSON
.
parse
(
await
deleteRoomApi
(
globalUserInfo
.
roomId
));
let
deleteRoomResult
=
JSON
.
parse
(
await
deleteRoomApi
(
globalUserInfo
.
roomId
)
);
if
(
deleteRoomResult
.
resultCode
==
200
)
{
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
3000
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
3000
));
}
coview_api
.
CreateRoom
(
globalUserInfo
.
roomId
,
...
...
@@ -532,7 +533,7 @@ document.addEventListener("DOMContentLoaded", function () {
coview_api
.
LeaveRoom
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
CHAT_UI
.
joinRoom
(
NativeBridge
.
joinRoom
(
CHAT
.
globalLoginParameter
.
roomId
,
CHAT
.
globalLoginParameter
.
name
);
...
...
@@ -783,16 +784,12 @@ function Coview_finishCollaboration() {
}
isLeaved
=
true
;
if
(
isInvited
==
InvitedFlag
.
NONE
)
{
CHAT_UI
.
joinRoom
(
NativeBridge
.
joinRoom
(
CHAT
.
globalLoginParameter
.
roomId
,
CHAT
.
globalLoginParameter
.
name
);
}
else
{
if
(
typeof
android
!=
"undefined"
)
{
android
.
openCommunicationHome
();
}
else
{
webkit
.
messageHandlers
.
openCommunicationHome
.
postMessage
({});
}
NativeBridge
.
openCommunicationHome
();
}
}
...
...
@@ -1041,11 +1038,11 @@ function captureAndShareImage(urls, changeHostName) {
});
}
function
toolToggle
(){
if
(
$
(
"#collabo_footer_menu"
).
hasClass
(
'hide'
))
{
$
(
"#collabo_footer_menu"
).
removeClass
(
'hide'
);
}
else
{
$
(
"#collabo_footer_menu"
).
addClass
(
'hide'
);
function
toolToggle
()
{
if
(
$
(
"#collabo_footer_menu"
).
hasClass
(
"hide"
))
{
$
(
"#collabo_footer_menu"
).
removeClass
(
"hide"
);
}
else
{
$
(
"#collabo_footer_menu"
).
addClass
(
"hide"
);
}
}
...
...
@@ -1071,12 +1068,12 @@ function recordStart() {
console
.
log
(
"レコードを開始しました"
);
MainManRecord
(
"on"
);
$
(
"#recordBtn .record"
).
addClass
(
"disable"
);
$
(
'.flash-txt'
).
addClass
(
'on'
);
$
(
".flash-txt"
).
addClass
(
"on"
);
}
function
recordFinished
()
{
$
(
"#recordBtn .record"
).
removeClass
(
"disable"
);
$
(
'.flash-txt'
).
removeClass
(
'on'
);
$
(
".flash-txt"
).
removeClass
(
"on"
);
// ロック画面の削除
delete_dom_obj
(
"screenLock"
);
}
...
...
@@ -1111,7 +1108,7 @@ function recordStop(callback) {
function
MainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
try
{
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
}
catch
(
exeption
)
{
console
.
log
(
"Record fail"
);
callback
();
}
...
...
@@ -1193,7 +1190,7 @@ function requestCollaborationFinish() {
}
async
function
waitMillisecond
(
millesecond
)
{
await
new
Promise
(
done
=>
setTimeout
(()
=>
done
(),
millesecond
));
await
new
Promise
(
(
done
)
=>
setTimeout
(()
=>
done
(),
millesecond
));
}
function
penToggle
()
{
...
...
public_new/js/sockets/chat-websocket-refresh-group-list.js
View file @
42fe068a
...
...
@@ -63,7 +63,8 @@ var setupBackButton = function () {
$
(
"#pills-chat-tab"
).
tab
(
"show"
);
}
else
{
if
(
IS_ONLINE
==
"true"
)
{
android
.
updateRoomList
();
// todo: peacekim:: needs to check it only needs for android or not.
NativeBridge
.
updateRoomList
();
CHAT_UI
.
refreshRoomList
(
ChatRoomType
.
DM
);
CHAT_UI
.
dismissLoadingIndicator
();
}
...
...
public_new/js/sockets/chat-websocket.js
View file @
42fe068a
...
...
@@ -58,11 +58,7 @@ var bindOnConnect = function () {
var
requestLoginInfo
=
function
()
{
// チャットルームに入場する際、sid, loginId, shopName, roomId, roomNameの情報を取得しNodeJsに渡す
if
(
CHAT_UTIL
.
isIOS
())
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
getLoginParameter
();
}
NativeBridge
.
getLoginParameter
();
};
var
bindOnDisconnect
=
function
()
{
...
...
@@ -127,10 +123,8 @@ var bindOnShowServerError = function () {
var
bindOnRetryJoinProcess
=
function
()
{
socket
.
on
(
SOCKET_KEY
.
RETRY_JOIN_PROCESS
,
function
()
{
var
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
CHAT_UTIL
.
isIOS
())
{
if
(
CHAT_UTIL
.
isIOS
()
||
CHAT_UTIL
.
isAndroid
()
)
{
webkit
.
messageHandlers
.
loginInfoRequestMessageHandlerId
.
postMessage
({});
}
else
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
getLoginParameter
();
}
else
{
CHAT_UI
.
htmlElementTextInitialize
(
"ko"
);
// webでのsocket connect
...
...
public_new/modal_chat_menu.html
View file @
42fe068a
...
...
@@ -13,7 +13,7 @@
<li><a
id=
"room_name_change_button"
href=
"chat_change_room_name.html"
><img
src=
"icon/icon_change_room_name.png"
alt=
"ルーム名変更"
>
ルーム名変更
</a>
</li>
<li><a
id=
"add_user_button"
href=
"chat_add_user.html"
><img
src=
"icon/icon_add_user.png"
alt=
"ユーザー招待"
>
ユーザー招待
</a></li>
<li
><a
id=
"display_off_button"
href=
"javascript:return false;"
onclick=
"
CHAT_UI
.roomDisplayOff();"
><img
src=
"icon/icon_display_off_chatroom.png"
alt=
"ユーザー招待"
>
部屋非表示
</a></li>
<li
><a
id=
"display_off_button"
href=
"javascript:return false;"
onclick=
"
NativeBridge
.roomDisplayOff();"
><img
src=
"icon/icon_display_off_chatroom.png"
alt=
"ユーザー招待"
>
部屋非表示
</a></li>
</ul>
</div>
</div>
...
...
public_new/template/template_open_collaboration_message.html
View file @
42fe068a
...
...
@@ -32,7 +32,7 @@
</div>
</div>
<div
class=
"collabo_btn"
>
<button
class=
"collaboation_join_button"
type=
"button"
name=
"button"
onclick=
"
CHAT_UI
.joinCollaboration({{collaborationType}}, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<button
class=
"collaboation_join_button"
type=
"button"
name=
"button"
onclick=
"
NativeBridge
.joinCollaboration({{collaborationType}}, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<img
src=
"icon/icon_profile_phone.png"
alt=
"通話"
>
{{#isEnded}}
<span
class=
"collaboration_join_message"
>
終了しました
</span>
...
...
public_new/template/template_room_list.html
View file @
42fe068a
<ul
class=
"m-0"
>
<li
class=
"d-flex align-items-center"
>
<a
href=
"#"
class=
"w-100"
onclick=
"
CHAT_UI
.joinRoom({{roomId}},'{{roomName}}');"
>
<a
href=
"#"
class=
"w-100"
onclick=
"
NativeBridge
.joinRoom({{roomId}},'{{roomName}}');"
>
<div
class=
"chat_item d-flex flex-row align-items-center"
>
<div
class=
"chat_item_l"
>
<div
class=
"thumbnail{{thumbnailCount}} thumbnail"
>
...
...
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