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
4d19a6c1
Commit
4d19a6c1
authored
Sep 09, 2021
by
Kim Peace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed to wait to finish callboration for send recorded data
parent
9d625253
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
public_new/js/views/collaboration/share-bind-button-action.js
+18
-11
No files found.
public_new/js/views/collaboration/share-bind-button-action.js
View file @
4d19a6c1
...
@@ -102,15 +102,9 @@ function recordStop(callback) {
...
@@ -102,15 +102,9 @@ function recordStop(callback) {
);
);
}
}
function
mainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
async
function
sendRecordedData
(
url
,
callback
)
{
try
{
return
new
Promise
(
function
(
done
)
{
mediaRecorder
.
stop
();
// get lastest message id and update message from server via native
}
catch
(
exeption
)
{
console
.
error
(
"Record failed"
);
callback
();
}
setTimeout
(
function
()
{
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
"video/webm"
});
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
"video/webm"
});
const
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
const
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
g_shareCount
++
;
g_shareCount
++
;
...
@@ -124,8 +118,21 @@ function mainManRecordWithCollaboration(action, url, callback) {
...
@@ -124,8 +118,21 @@ function mainManRecordWithCollaboration(action, url, callback) {
:
ARCHIVE_TYPE
.
VOICE
;
:
ARCHIVE_TYPE
.
VOICE
;
formData
.
append
(
"archiveType"
,
collaborationType
);
formData
.
append
(
"archiveType"
,
collaborationType
);
postRecords
(
url
,
formData
,
callback
);
postRecords
(
url
,
formData
,
function
()
{
},
1000
);
done
();
callback
();
});
});
}
function
mainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
try
{
mediaRecorder
.
stop
();
}
catch
(
exeption
)
{
console
.
error
(
"Record failed"
);
callback
();
}
sendRecordedData
(
url
,
callback
);
}
}
function
postRecords
(
url
,
formData
,
callback
)
{
function
postRecords
(
url
,
formData
,
callback
)
{
...
...
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