Skip to content
Snippets Groups Projects
Commit 7f759f02 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Render a player for video files

parent 211c01ff
No related merge requests found
...@@ -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}}
......
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment