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
0e1d21de
Commit
0e1d21de
authored
May 31, 2021
by
Takatoshi Miura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#42990#43004_saveArchive_レコード中の協業終了時、長時間レコード時にアーカイブに保存されないバグを修正
parent
15ff2894
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
7 deletions
+83
-7
public_new/js/collaboration.js
+73
-3
public_new/js/share.js
+10
-4
No files found.
public_new/js/collaboration.js
View file @
0e1d21de
...
...
@@ -4,10 +4,80 @@ function recordStart() {
$
(
'#recordBtn'
).
addClass
(
'bg_red'
);
}
function
recordStop
()
{
MainManRecord
(
'stop'
,
CMS_SERVER_URL
+
'/chatapi/file/uploadArchive'
);
function
recordStop
(
callback
)
{
// アーカイブ保存中は画面操作不可(協業終了,協業切り替え防止)
screenLock
();
// アーカイブ保存処理
MainManRecordWithCollaboration
(
'stop'
,
CMS_SERVER_URL
+
'/chatapi/file/uploadArchive'
,
callback
);
}
function
MainManRecordWithCollaboration
(
action
,
url
,
callback
)
{
mediaRecorder
.
stop
();
console
.
log
(
'Recorded Blobs: '
,
recordedBlobs
);
setTimeout
(
function
()
{
console
.
log
(
"Recoding File upload.."
);
const
blob
=
new
Blob
(
recordedBlobs
,
{
type
:
'video/webm'
});
console
.
log
(
blob
)
var
uploadFileName
=
"record_"
+
g_webroom
+
"_"
+
g_shareCount
+
".webm"
;
g_shareCount
++
;
var
formData
=
new
FormData
();
formData
.
append
(
"fileData"
,
blob
,
uploadFileName
);
formData
.
append
(
'sid'
,
globalUserInfo
.
sid
);
formData
.
append
(
'roomId'
,
globalUserInfo
.
roomId
);
formData
.
append
(
'archiveType'
,
1
);
console
.
log
(
uploadFileName
)
$
.
ajax
({
type
:
'post'
,
url
,
data
:
formData
,
contentType
:
false
,
processData
:
false
,
success
:
function
(
res
)
{
recordFinished
();
callback
();
console
.
log
(
res
)
}
,
error
:
function
(
err
){
recordFinished
();
callback
();
console
.
log
(
err
);
}
});
},
1000
);
}
function
screenLock
(){
// ロック用のdivを生成
var
element
=
document
.
createElement
(
'div'
);
element
.
id
=
"screenLock"
;
// ロック用のスタイル
element
.
style
.
height
=
'100%'
;
element
.
style
.
left
=
'0px'
;
element
.
style
.
position
=
'fixed'
;
element
.
style
.
top
=
'0px'
;
element
.
style
.
width
=
'100%'
;
element
.
style
.
zIndex
=
'9999'
;
element
.
style
.
opacity
=
'0'
;
var
objBody
=
document
.
getElementsByTagName
(
"body"
).
item
(
0
);
objBody
.
appendChild
(
element
);
}
// div削除関数
function
delete_dom_obj
(
id_name
)
{
var
dom_obj
=
document
.
getElementById
(
id_name
);
var
dom_obj_parent
=
dom_obj
.
parentNode
;
dom_obj_parent
.
removeChild
(
dom_obj
);
}
function
recordFinished
()
{
$
(
'#recordBtn'
).
addClass
(
'bg_gray'
);
$
(
'#recordBtn'
).
removeClass
(
'bg_red'
);
// ロック画面の削除
delete_dom_obj
(
'screenLock'
);
}
$
(
function
()
{
...
...
@@ -138,7 +208,7 @@ $(function () {
if
(
$
(
'#recordBtn'
).
hasClass
(
'bg_gray'
))
{
recordStart
();
}
else
{
recordStop
();
recordStop
(
null
);
}
})
});
...
...
public_new/js/share.js
View file @
0e1d21de
...
...
@@ -178,9 +178,10 @@ $(function () {
}
}
else
if
(
data
.
type
===
"API_SEND_OWNER_CHANGE_COMPLETE"
)
{
if
(
$
(
'#recordBtn'
).
hasClass
(
'bg_red'
))
{
recordStop
();
recordStop
(
penOff
);
}
else
{
penOff
();
}
penOff
();
}
else
if
(
data
.
type
===
"CHANGE_HOST_APPLY"
)
{
if
(
CHAT_UTIL
.
isAndroid
())
{
android
.
setHostRequestFlg
(
HOST_REQUEST_FLG
.
DOING
);
...
...
@@ -412,7 +413,7 @@ function changeCollaboration(changeCollaborationType) {
}
joinCollaborationType
=
changeCollaborationType
;
if
(
$
(
'#recordBtn'
).
hasClass
(
'bg_red'
))
{
recordStop
();
recordStop
(
null
);
}
initCollaborationUI
(
changeCollaborationType
);
switch
(
changeCollaborationType
)
{
...
...
@@ -523,8 +524,13 @@ function Coview_exitCollaboration(isDocument = false) {
}
}
if
(
$
(
'#recordBtn'
).
hasClass
(
'bg_red'
))
{
recordStop
();
recordStop
(
Coview_finishCollaboration
);
}
else
{
Coview_finishCollaboration
();
}
}
function
Coview_finishCollaboration
()
{
clearInterval
(
timeInterval
);
coview_api
.
LeaveRoom
();
if
(
coview_api
.
getRoomUsers
())
{
...
...
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