Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
7f759f02
Commit
7f759f02
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Render a player for video files
parent
211c01ff
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/rocketchat-message-attachments/client/messageAttachment.html
+9
-0
9 additions, 0 deletions
...ketchat-message-attachments/client/messageAttachment.html
packages/rocketchat-ui/lib/fileUpload.coffee
+5
-0
5 additions, 0 deletions
packages/rocketchat-ui/lib/fileUpload.coffee
with
14 additions
and
0 deletions
packages/rocketchat-message-attachments/client/messageAttachment.html
+
9
−
0
View file @
7f759f02
...
@@ -71,6 +71,15 @@
...
@@ -71,6 +71,15 @@
</div>
</div>
{{/if}}
{{/if}}
{{#if video_url}}
<div
class=
"attachment-video"
>
<video
controls
class=
"inline-video"
>
<source
src=
"{{fixCordova video_url}}"
type=
"{{video_type}}"
>
Your browser does not support the video element.
</video>
</div>
{{/if}}
{{#if fields}}
{{#if fields}}
<div
class=
"attachment-fields"
>
<div
class=
"attachment-fields"
>
{{#each fields}}
{{#each fields}}
...
...
This diff is collapsed.
Click to expand it.
packages/rocketchat-ui/lib/fileUpload.coffee
+
5
−
0
View file @
7f759f02
...
@@ -102,6 +102,11 @@ readAsArrayBuffer = (file, callback) ->
...
@@ -102,6 +102,11 @@ readAsArrayBuffer = (file, callback) ->
attachment
.
audio_type
=
file
.
type
attachment
.
audio_type
=
file
.
type
attachment
.
audio_size
=
file
.
size
attachment
.
audio_size
=
file
.
size
if
/^video\/.+/
.
test
file
.
type
attachment
.
video_url
=
url
attachment
.
video_type
=
file
.
type
attachment
.
video_size
=
file
.
size
msg
=
msg
=
_id
:
Random
.
id
()
_id
:
Random
.
id
()
rid
:
roomId
rid
:
roomId
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment