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
42593f80
Commit
42593f80
authored
Sep 09, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed collaboraiton stop recording for android
parent
e3bbf38a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletions
+18
-1
public_new/js/sockets/chat-websocket-message.js
+2
-1
public_new/js/views/collaboration/share-bind-button-action.js
+11
-0
public_new/js/views/collaboration/share-event-listener.js
+4
-0
public_new/js/views/collaboration/share.js
+1
-0
No files found.
public_new/js/sockets/chat-websocket-message.js
View file @
42593f80
...
...
@@ -20,7 +20,8 @@ CHAT_SOCKET.handleMessage = function (message, roomName, socketKey, collaboratio
)
{
CHAT_SOCKET
.
cleanUpCollaborationMessage
();
if
(
typeof
CoviewBridge
!==
"undefined"
)
{
if
(
typeof
CoviewBridge
!==
"undefined"
&&
g_isMainMan
!==
"undefined"
&&
g_isMainMan
==
false
)
{
console
.
log
(
"peacekim:: CHAT_SOCKET.handleMessage finishcollaboration"
);
CoviewBridge
.
finishCollaboration
();
}
return
;
...
...
public_new/js/views/collaboration/share-bind-button-action.js
View file @
42593f80
...
...
@@ -87,7 +87,9 @@ function toggleRecord() {
function
recordStop
()
{
return
new
Promise
(
function
(
done
)
{
console
.
log
(
"peacekim:: recordStop start"
);
if
(
!
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
console
.
log
(
"peacekim:: recordStop done 1"
);
done
();
return
;
}
...
...
@@ -97,12 +99,14 @@ function recordStop() {
// アーカイブ保存処理
mainManRecordStopWithCollaboration
().
then
(
function
()
{
console
.
log
(
"peacekim:: recordStop done 2"
);
done
();
});
});
}
async
function
sendRecordedData
()
{
console
.
log
(
"peacekim:: sendRecordedData start"
);
return
new
Promise
(
function
(
done
)
{
// get lastest message id and update message from server via native
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
"video/webm"
});
...
...
@@ -119,26 +123,31 @@ async function sendRecordedData() {
formData
.
append
(
"archiveType"
,
collaborationType
);
postRecords
(
formData
).
then
(
function
()
{
console
.
log
(
"peacekim:: sendRecordedData done 1"
);
done
();
});
});
}
function
mainManRecordStopWithCollaboration
()
{
console
.
log
(
"peacekim:: mainManRecordStopWithCollaboration start"
);
return
new
Promise
(
function
(
done
)
{
try
{
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
console
.
error
(
"Record stop failed"
);
console
.
log
(
"peacekim:: mainManRecordStopWithCollaboration done 1"
);
done
();
}
sendRecordedData
().
then
(
function
()
{
console
.
log
(
"peacekim:: mainManRecordStopWithCollaboration done 2"
);
done
();
});
});
}
function
postRecords
(
formData
)
{
console
.
log
(
"peacekim:: postRecords start"
);
return
new
Promise
(
function
(
done
)
{
$
.
ajax
({
type
:
"post"
,
...
...
@@ -149,11 +158,13 @@ function postRecords(formData) {
success
:
function
(
res
)
{
recordFinished
();
Common
.
dismissLoadingIndicator
();
console
.
log
(
"peacekim:: postRecords done 1"
);
done
();
},
error
:
function
(
err
)
{
recordFinished
();
Common
.
dismissLoadingIndicator
();
console
.
log
(
"peacekim:: postRecords done 2"
);
done
();
},
});
...
...
public_new/js/views/collaboration/share-event-listener.js
View file @
42593f80
...
...
@@ -198,6 +198,7 @@ CollaborationFeature.didReceiveLoginResponseMessage = async function () {
}
else
if
(
isHost
)
{
globalUserInfo
.
meetingID
=
NativeBridgeDataSource
.
createContentView
();
if
(
globalUserInfo
.
meetingID
==
"-1"
)
{
console
.
log
(
"peacekim:: didReceiveLoginResponseMessage - finishCollaboration"
);
//会議室作成失敗
CoviewBridge
.
finishCollaboration
();
return
;
...
...
@@ -511,14 +512,17 @@ CoviewBridge.exitCollaboration = function () {
if
(
$
(
"#recordBtn .record"
).
hasClass
(
"disable"
))
{
recordStop
().
then
(
function
()
{
console
.
log
(
"peacekim:: exitCollaboration - finishCollaboration 1"
);
CoviewBridge
.
finishCollaboration
();
});
}
else
{
console
.
log
(
"peacekim:: exitCollaboration - finishCollaboration 2"
);
CoviewBridge
.
finishCollaboration
();
}
};
CoviewBridge
.
finishCollaboration
=
function
()
{
console
.
log
(
"peacekim:: finishCollaboration start"
);
Common
.
showLoadingIndicator
();
coview_api
.
LeaveRoom
();
if
(
coview_api
.
getRoomUsers
())
{
...
...
public_new/js/views/collaboration/share.js
View file @
42593f80
...
...
@@ -53,6 +53,7 @@ function changeCollaboration(collaborationType) {
coview_api
.
ChangeCollaboration
(
"audio"
);
newMeetingID
=
NativeBridgeDataSource
.
createContentView
();
if
(
newMeetingID
==
"-1"
)
{
console
.
log
(
"peacekim:: changeCollaboration to collaborationType doument call finishcollaboration "
);
//会議室作成失敗
CoviewBridge
.
finishCollaboration
();
return
;
...
...
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