Skip to content

Instantly share code, notes, and snippets.

@martinstannard
Created September 18, 2014 20:54
Show Gist options
  • Save martinstannard/959342db9f91face1609 to your computer and use it in GitHub Desktop.
Save martinstannard/959342db9f91face1609 to your computer and use it in GitHub Desktop.
# component
WF.MediaPlayerComponent = Ember.Component.extend
tagName: 'div'
classNames: ['media-player-element']
# template
{{#if audioUrl}}
<audio id="media-player" {{bind-attr src=audioUrl}} controls />
{{/if}}
{{#if mp4Url}}
<video id="media-player" controls width="800" height="0">
<source {{bind-attr src=mp4Url}}" type='video/mp4'>
<source {{bind-attr src=webmUrl}}" type='video/webm'>
</video>
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment