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
2e76ee6a
Commit
2e76ee6a
authored
Jul 19, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed collaboration bug
parent
52e466d4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
76 additions
and
61 deletions
+76
-61
public_new/collaboration.html
+0
-2
public_new/js/common/constant.js
+3
-0
public_new/js/common/native-bridge-delegate.js
+3
-3
public_new/js/sockets/chat-websocket-message.js
+0
-1
public_new/js/utils/chat-util.js
+8
-1
public_new/js/views/collaboration/collaboration-add-user.js
+1
-1
public_new/js/views/collaboration/collaboration.js
+3
-5
public_new/js/views/collaboration/fermi-web-socket-bridge.js
+1
-2
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
+34
-28
public_new/js/views/collaboration/share-event-listener.js
+10
-2
public_new/js/views/collaboration/share.js
+12
-15
public_new/template/template_open_collaboration_message.html
+1
-1
No files found.
public_new/collaboration.html
View file @
2e76ee6a
...
...
@@ -182,8 +182,6 @@
}
}
updateCollaborationUI
(
globalUserInfo
.
collaborationType
);
if
(
globalUserInfo
.
joinType
!=
COLLABORATION_JOIN_TYPE
.
INVITED
)
{
CHAT_SOCKET
.
initialJoin
();
}
...
...
public_new/js/common/constant.js
View file @
2e76ee6a
...
...
@@ -186,3 +186,5 @@ const NATIVE_KEY_IOS = {
getMessageListFromMessageId
:
"getMessageListFromMessageId"
,
updatePreMessage
:
"updatePreMessage"
,
};
const
BIZ_TASK_YELL_URL
=
"https://biztaskyell.abookcloud.com"
;
\ No newline at end of file
public_new/js/common/native-bridge-delegate.js
View file @
2e76ee6a
...
...
@@ -94,14 +94,14 @@ NativeBridgeDelegate.updateGroupInfo = function (groupID) {
NativeBridgeDelegate
.
joinCollaboration
=
function
(
collaborationType
,
meetingI
d
=
0
meetingI
D
=
0
)
{
const
collaborationTypeNumber
=
CHAT_UTIL
.
getCollaborationTypeNumber
(
collaborationType
);
if
(
deviceInfo
.
isiOS
())
{
webkit
.
messageHandlers
.
joinCollaboration
.
postMessage
({
collaborationType
:
collaborationTypeNumber
,
meetingId
:
meetingI
d
,
meetingId
:
meetingI
D
,
});
}
else
if
(
deviceInfo
.
isAndroid
())
{
if
(
...
...
@@ -111,7 +111,7 @@ NativeBridgeDelegate.joinCollaboration = function (
alert
(
getLocalizedString
(
"not_support_version"
));
return
;
}
android
.
joinCollaboration
(
collaborationTypeNumber
,
meetingI
d
);
android
.
joinCollaboration
(
collaborationTypeNumber
,
meetingI
D
);
}
};
...
...
public_new/js/sockets/chat-websocket-message.js
View file @
2e76ee6a
...
...
@@ -5,7 +5,6 @@ var bindOnNewMessage = function () {
const
systemMessageTemplate
=
getTemplate
(
TemplateURL
.
SYSTEM_MESSAGE
);
const
unwrappedMessageInfo
=
decodeMessage
(
message
.
text
);
if
(
unwrappedMessageInfo
==
DATA_MESSAGE_SCHEME
+
FINISH_ALL_COLLABORATION_SIGNAL
...
...
public_new/js/utils/chat-util.js
View file @
2e76ee6a
...
...
@@ -110,14 +110,21 @@ function updateDuration() {
CHAT_UTIL
.
getCollaborationType
=
function
(
collaborationNumber
)
{
switch
(
collaborationNumber
)
{
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
:
// fall through
case
COLLABORATION_TYPE_NUMBER
.
AUDIO
.
toString
():
return
COLLABORATION_TYPE
.
AUDIO
;
case
COLLABORATION_TYPE_NUMBER
.
CAMERA
:
case
COLLABORATION_TYPE_NUMBER
.
CAMERA
.
toString
():
// fall through
return
COLLABORATION_TYPE
.
CAMERA
;
case
COLLABORATION_TYPE_NUMBER
.
VIDEO
:
case
COLLABORATION_TYPE_NUMBER
.
VIDEO
.
toString
():
// fall through
return
COLLABORATION_TYPE
.
VIDEO
;
case
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
:
case
COLLABORATION_TYPE_NUMBER
.
DOCUMENT
.
toString
():
// fall through
return
COLLABORATION_TYPE
.
DOCUMENT
;
case
COLLABORATION_TYPE_NUMBER
.
BOARD
:
case
COLLABORATION_TYPE_NUMBER
.
BOARD
.
toString
():
// fall through
return
COLLABORATION_TYPE
.
BOARD
;
default
:
return
0
;
}
...
...
public_new/js/views/collaboration/collaboration-add-user.js
View file @
2e76ee6a
CollaborationUI
.
b
indAddUserButton
=
function
()
{
CollaborationUI
.
initialB
indAddUserButton
=
function
()
{
// ユーザー招待メンバー検索
$
(
".add_user_btn"
).
click
(
function
()
{
CollaborationUI
.
enableScroll
();
...
...
public_new/js/views/collaboration/collaboration.js
View file @
2e76ee6a
...
...
@@ -19,9 +19,7 @@ document.addEventListener("DOMContentLoaded", function () {
// ユーザー追加イベント
CollaborationUI
.
bindInviteButton
();
CollaborationUI
.
bindAddUserButton
();
CollaborationUI
.
displayAddUserButtonIfNeeded
();
CollaborationUI
.
initialBindAddUserButton
();
});
/*********************************
...
...
@@ -123,7 +121,7 @@ CollaborationUI.makeNameCard = function (shopMemberID) {
"host"
);
let
namecardH
tml
=
Mustache
.
render
(
namecardTemplate
,
{
let
namecardH
TML
=
Mustache
.
render
(
namecardTemplate
,
{
shopMemberId
:
nameCardInfo
.
shopMemberId
,
profileUrl
:
nameCardInfo
.
profileUrl
,
loginId
:
nameCardInfo
.
loginId
,
...
...
@@ -134,7 +132,7 @@ CollaborationUI.makeNameCard = function (shopMemberID) {
whosHost
:
whosHost
,
});
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardH
tml
)).
on
(
let
namecardObj
=
$
(
jQuery
.
parseHTML
(
namecardH
TML
)).
on
(
"click"
,
function
()
{}
);
...
...
public_new/js/views/collaboration/fermi-web-socket-bridge.js
View file @
2e76ee6a
...
...
@@ -84,5 +84,4 @@ FermiWebSocketBridge.changeHostApply = function () {
fw
.
sendToMsg
(
"others"
,
"CHANGE_HOST_APPLY"
,
{
hostId
:
currentUserInfo
.
loginID
,
});
}
};
public_new/js/views/collaboration/fermi-web-socket-message-handler.js
View file @
2e76ee6a
...
...
@@ -31,6 +31,9 @@ FermiWebSocketMessageHandler.handleMessagesToHost = function (data) {
FermiWebSocketMessageHandler
.
shareFileHost
();
}
break
;
case
"CHANGE_HOST_APPLY"
:
FermiWebSocketMessageHandler
.
changeHostApplyForHost
(
data
);
break
;
default
:
break
;
}
...
...
@@ -55,7 +58,7 @@ FermiWebSocketMessageHandler.handleMessagesToSelf = function (data) {
}
};
FermiWebSocketMessageHandler
.
handleMessagesToAll
=
function
()
{
FermiWebSocketMessageHandler
.
handleMessagesToAll
=
function
(
data
)
{
switch
(
data
.
type
)
{
case
"CHANGE_COLLABORATION"
:
FermiWebSocketMessageHandler
.
changeCollaboration
(
data
);
...
...
@@ -74,7 +77,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function () {
}
break
;
case
"CHANGE_HOST_APPLY"
:
FermiWebSocketMessageHandler
.
changeHostApply
(
data
);
FermiWebSocketMessageHandler
.
changeHostApply
ForNotHost
(
data
);
break
;
case
"HOST_REQUEST_DONE"
:
FermiWebSocketMessageHandler
.
hostRequestDone
();
...
...
@@ -110,8 +113,10 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
FermiWebSocketMessageHandler
.
updateJoinChangeCollaboration
(
data
.
payload
.
collaborationType
);
globalUserInfo
.
meetingID
=
newMeetingID
;
updateCollaborationUI
(
globalUserInfo
.
collaborationType
);
CollaborationUI
.
updateScreen
(
globalUserInfo
.
collaborationType
);
NativeBridgeDelegate
.
joinChangedCollaboration
(
globalUserInfo
.
collaborationType
,
...
...
@@ -125,14 +130,14 @@ FermiWebSocketMessageHandler.changeCollaboration = function (data) {
// SHARE_FILE
FermiWebSocketMessageHandler
.
shareFile
=
function
()
{
updateCollaborationUI
(
COLLABORATION_TYPE
.
CAMERA
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
FermiWebSocketBridge
.
shareFileHost
(
COLLABORATION_TYPE
.
CAMERA
);
};
// SHARE_FILE_HOST
FermiWebSocketMessageHandler
.
shareFileHost
=
function
()
{
updateCollaborationUI
(
COLLABORATION_TYPE
.
CAMERA
);
CollaborationUI
.
updateScreen
(
COLLABORATION_TYPE
.
CAMERA
);
globalUserInfo
.
collaborationType
=
COLLABORATION_TYPE
.
CAMERA
;
};
...
...
@@ -213,33 +218,34 @@ FermiWebSocketMessageHandler.apiSendOwnerChangeConfirm = function () {
};
// CHANGE_HOST_APPLY
FermiWebSocketMessageHandler
.
changeHostApply
=
function
(
data
)
{
if
(
g_isMainMan
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
if
(
deviceInfo
.
isAndroid
())
{
$
(
".pip_indicator"
).
addClass
(
"none"
);
}
FermiWebSocketMessageHandler
.
changeHostApplyForNotHost
=
function
(
data
)
{
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
waitMillisecond
(
500
);
};
// CHANGE_HOST_APPLY
FermiWebSocketMessageHandler
.
changeHostApplyForHost
=
function
(
data
)
{
coview_api
.
HeartBeatUser
(
globalUserInfo
.
loginId
);
NativeBridgeDelegate
.
finishPIPMode
(
true
);
if
(
deviceInfo
.
isAndroid
())
{
$
(
".pip_indicator"
).
addClass
(
"none"
);
}
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
waitMillisecond
(
500
);
waitMillisecond
(
500
);
if
(
confirm
(
getLocalizedString
(
"norify_request_host_change"
,
data
.
payload
.
hostId
)
)
)
{
CoviewBridge
.
changeHost
(
getFermiLoginId
(
data
.
payload
.
hostId
));
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
}
else
{
FermiWebSocketBridge
.
hostRequestReject
(
data
.
payload
.
hostId
);
}
FermiWebSocketBridge
.
hostRequestDone
(
data
.
payload
.
hostId
);
if
(
confirm
(
getLocalizedString
(
"norify_request_host_change"
,
data
.
payload
.
hostId
)
)
)
{
CoviewBridge
.
changeHost
(
getFermiLoginId
(
data
.
payload
.
hostId
));
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
}
else
{
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DOING
);
waitMillisecond
(
500
);
FermiWebSocketBridge
.
hostRequestReject
(
data
.
payload
.
hostId
);
}
FermiWebSocketBridge
.
hostRequestDone
(
data
.
payload
.
hostId
);
};
// HOST_REQUEST_DONE
...
...
@@ -266,7 +272,7 @@ FermiWebSocketMessageHandler.getCollaborationTypeResponse = function (data) {
data
.
payload
.
collaborationType
);
globalUserInfo
.
meetingID
=
data
.
payload
.
newMeetingId
;
updateCollaborationUI
(
globalUserInfo
.
collaborationType
);
CollaborationUI
.
updateScreen
(
globalUserInfo
.
collaborationType
);
NativeBridgeDelegate
.
joinChangedCollaboration
(
globalUserInfo
.
collaborationType
,
...
...
public_new/js/views/collaboration/share-event-listener.js
View file @
2e76ee6a
...
...
@@ -3,10 +3,18 @@ var CollaborationFeature = {};
CoviewBridge
.
bindReadyEvent
=
function
()
{
coview_api
.
addEventListener
(
"ready"
,
function
()
{
CoviewBridge
.
bindFermiWebSocketOpenned
();
// add login ID if not exist
CoviewBridge
.
addLoginID
(
globalUserInfo
.
loginId
);
coview_api
.
Login
(
globalUserInfo
.
loginId
);
updateCollaborationUI
(
globalUserInfo
.
collaborationType
);
CollaborationUI
.
updateScreen
(
globalUserInfo
.
collaborationType
);
NativeBridgeDelegate
.
setHostRequestFlg
(
HostRequestFlag
.
DONE
);
});
};
CoviewBridge
.
bindFermiWebSocketOpenned
=
function
()
{
wc_api
.
addEventListener
(
"open"
,
async
function
(
event
)
{
FermiWebSocketMessageHandler
.
bindWebSocketMessage
();
});
};
...
...
@@ -217,7 +225,7 @@ CoviewBridge.changeHost = function (userID) {
};
CoviewBridge
.
addLoginID
=
function
(
loginID
)
{
const
url
=
"https://biztaskyell.abookcloud.com
/auth/getuser"
;
const
url
=
BIZ_TASK_YELL_URL
+
"
/auth/getuser"
;
$
.
ajax
({
url
:
url
,
method
:
"post"
,
...
...
public_new/js/views/collaboration/share.js
View file @
2e76ee6a
...
...
@@ -8,7 +8,7 @@ var backgroundFileName;
document
.
addEventListener
(
"DOMContentLoaded"
,
function
()
{
coview_api
.
Init
({
coview_api_srv_addr
:
"https://biztaskyell.abookcloud.com"
,
coview_api_srv_addr
:
BIZ_TASK_YELL_URL
,
coview_wrap_id
:
"coviewShare"
,
coview_api_key
:
"8dda7092c5820d663"
,
});
...
...
@@ -29,14 +29,15 @@ document.addEventListener("DOMContentLoaded", function () {
// call from collaboration_overlay_menu.html and collaboration.html
function
changeCollaboration
(
collaborationType
)
{
recordStop
(
function
()
{
var
newMeetingI
d
=
0
;
var
newMeetingI
D
=
0
;
if
(
globalUserInfo
.
collaborationType
==
COLLABORATION_TYPE
.
DOCUMENT
)
{
NativeBridgeDelegate
.
exitMeetingRoom
();
}
NativeBridgeDelegate
.
setJoinCollaborationType
(
collaborationType
);
globalUserInfo
.
collaborationType
=
collaborationType
;
updateCollaborationUI
(
collaborationType
);
CollaborationUI
.
updateScreen
(
collaborationType
);
switch
(
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
coview_api
.
ChangeCollaboration
(
"audio"
);
...
...
@@ -50,7 +51,7 @@ function changeCollaboration(collaborationType) {
break
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
coview_api
.
ChangeCollaboration
(
"audio"
);
newMeetingI
d
=
NativeBridgeDataSource
.
createContentView
();
newMeetingI
D
=
NativeBridgeDataSource
.
createContentView
();
break
;
case
COLLABORATION_TYPE
.
BOARD
:
coview_api
.
ChangeCollaboration
(
"audio"
);
...
...
@@ -63,15 +64,14 @@ function changeCollaboration(collaborationType) {
micOn
();
}
NativeBridgeDelegate
.
changeCollaboration
(
collaborationType
,
newMeetingId
);
globalUserInfo
.
meetingID
=
newMeetingId
;
globalUserInfo
.
meetingID
=
newMeetingID
;
FermiWebSocketBridge
.
changeCollaboration
();
NativeBridgeDelegate
.
changeCollaboration
(
collaborationType
,
newMeetingID
);
FermiWebSocketBridge
.
changeCollaboration
(
collaborationType
,
newMeetingID
);
});
}
async
function
updateCollaborationUI
(
collaborationType
)
{
CollaborationUI
.
updateScreen
=
async
function
(
collaborationType
)
{
$
(
"#coviewEraserCtrBtn"
).
click
();
if
(
$
(
".user_btn"
).
hasClass
(
"hide"
))
{
$
(
".user_btn"
).
click
();
...
...
@@ -84,25 +84,22 @@ async function updateCollaborationUI(collaborationType) {
$
(
"link[href='./css/collaboration_board.css']"
).
remove
();
$
(
".collaboration_contents"
).
addClass
(
"none"
);
switch
(
collaborationType
)
{
case
COLLABORATION_TYPE
.
AUDIO
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".voice_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
CAMERA
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".picture_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
VIDEO
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".video_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
DOCUMENT
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".document_contents"
).
removeClass
(
"none"
);
break
;
case
COLLABORATION_TYPE
.
BOARD
:
$
(
".collaboration_contents"
).
addClass
(
"none"
);
$
(
".board_contents"
).
removeClass
(
"none"
);
$
(
"head"
).
append
(
'<link rel="stylesheet" href="./css/collaboration_board.css">'
...
...
@@ -111,7 +108,7 @@ async function updateCollaborationUI(collaborationType) {
}
await
waitMillisecond
(
1000
);
$
(
".before_loading_indicator"
).
addClass
(
"none"
);
}
}
;
// call from modal_collabo_host_request.html
function
applyForHostChange
()
{
...
...
public_new/template/template_open_collaboration_message.html
View file @
2e76ee6a
...
...
@@ -32,7 +32,7 @@
</div>
</div>
<div
class=
"collabo_btn"
>
<button
class=
"collaboation_join_button"
type=
"button"
name=
"button"
onclick=
"NativeBridgeDelegate.joinCollaboration(
{{collaborationType}}
, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<button
class=
"collaboation_join_button"
type=
"button"
name=
"button"
onclick=
"NativeBridgeDelegate.joinCollaboration(
'{{collaborationType}}'
, {{meetingId}})"
{{#
isEnded
}}
disabled
{{/
isEnded
}}
>
<img
src=
"icon/icon_profile_phone.png"
alt=
"通話"
>
{{#isEnded}}
<span
class=
"collaboration_join_message"
>
終了しました
</span>
...
...
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