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
5405f280
Commit
5405f280
authored
May 26, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
動画エンコード実装
parent
e23b43b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
2 deletions
+49
-2
public_new/js/chat-ui.js
+46
-1
public_new/js/share.js
+3
-1
No files found.
public_new/js/chat-ui.js
View file @
5405f280
...
...
@@ -243,7 +243,7 @@ $('#image-form').on('submit', function(e) {
$
(
'.loader'
).
addClass
(
'active'
);
CHAT_UI
.
showLoadingIndicator
();
var
fd
=
new
FormData
(
$
(
this
)[
0
]);
console
.
log
(
$
(
this
)[
0
]);
//画像の大きさが500pixelより大きかったら、thumbnailを生成
CHAT
.
createThumbnailAndUpload
(
file
,
function
(
resizeFile
,
thumbnailCreated
)
{
if
(
resizeFile
&&
thumbnailCreated
)
{
...
...
@@ -826,6 +826,51 @@ CHAT_UI.deleteButtonAction = function(isInvite) {
$
(
'#select_user_list .user_list'
).
find
(
'.userCheckBox'
).
show
();
}
CHAT_UI
.
videoEncodeEnd
=
function
(
encodedUri
)
{
console
.
log
(
'encode end'
);
console
.
log
(
encodedUri
);
// convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
var
byteString
=
atob
(
encodedUri
.
split
(
','
)[
1
]);
// separate out the mime component
var
mimeString
=
encodedUri
.
split
(
','
)[
0
].
split
(
':'
)[
1
].
split
(
';'
)[
0
]
// write the bytes of the string to an ArrayBuffer
var
ab
=
new
ArrayBuffer
(
byteString
.
length
);
// create a view into the buffer
var
ia
=
new
Uint8Array
(
ab
);
// set the bytes of the buffer to the correct values
for
(
var
i
=
0
;
i
<
byteString
.
length
;
i
++
)
{
ia
[
i
]
=
byteString
.
charCodeAt
(
i
);
}
// write the ArrayBuffer to a blob, and you're done
var
blob
=
new
Blob
([
ab
],
{
type
:
"video/mp4"
});
console
.
log
(
blob
);
var
formData
=
new
FormData
();
/*formData.append("fileData",blob,uploadFileName);
formData.append('sid', globalUserInfo.sid);
formData.append('roomId', globalUserInfo.roomId);*/
CHAT_UI
.
dismissLoadingIndicator
();
/* var path = CHAT_DB.loadEncodedFile();
var file = $('#videoInputTag');
file = path;
if (file) {
var fd = new FormData($('#video-form')[0]);
// var requestFile = RequestBody.create(MediaType.parse("video/mp4"), file)
// var fd = new FormData($('#video-form')[0]);
// console.log("kdh check requestFile = " + requestFile);
CHAT.uploadImage(fd);
return;
}*/
};
CHAT_UI
.
htmlElementTextInitialize
=
function
(
languageCode
)
{
moment
.
locale
(
languageCode
);
setLanguage
(
languageCode
);
...
...
public_new/js/share.js
View file @
5405f280
...
...
@@ -213,7 +213,8 @@ $(function () {
coview_api
.
addEventListener
(
"destroy"
,
function
()
{
console
.
log
(
"=============> DESTROY : share destroy"
);
coview_api
.
LeaveRoom
();
alert
(
getLocalizedString
(
"inform_exit_host_collaboration"
));
Coview_exitCollaboration
();
$
(
".coview_share_area"
).
hide
();
$
(
"#loadingIndicator"
).
removeClass
(
"full_active"
);
});
...
...
@@ -346,6 +347,7 @@ $(function () {
console
.
log
(
"consoleLog"
,
json
);
break
;
case
"fileChange"
:
if
(
joinCollaborationType
!=
COLLABORATION_TYPE
.
CAMERA
)
{
break
;
}
LoadMobileShareFile
(
json
.
fileName
);
backgroundFileName
=
json
.
fileName
;
console
.
log
(
"fileChange"
,
json
);
...
...
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