Skip to content

Instantly share code, notes, and snippets.

@davetayls
Created August 24, 2011 14:20
Show Gist options
  • Save davetayls/1168180 to your computer and use it in GitHub Desktop.
Save davetayls/1168180 to your computer and use it in GitHub Desktop.
Html5 Video partial for http://github.com/aqueduct/appia
<!-- VideoJS partial for AppiaSkeletona -->
<div class="video-js-box">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video id="@Model.id"
class="video-js"
width="@Model.width"
height="@Model.height"
controls="controls"
preload="auto"
poster="@Model.image">
<source src="@(Model.src).mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="@(Model.src).webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="@(Model.src).theora.ogv" type='video/ogg; codecs="theora, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object id="@(Model.id)-flash" class="vjs-flash-fallback" width="@Model.width" height="@Model.height" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["@Model.image", {"url": "@(Model.src).mp4","autoPlay": true,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="@Model.image" width="@Model.width" height="@Model.height" alt="Poster Image" title="No video playback capabilities." />
</object>
</video>
<!-- Download links provided for devices that can't play video in the browser. -->
<p class="vjs-no-video"><strong>Download Video:</strong>
<a href="@(Model.src).mp4">MP4</a>,
<a href="@(Model.src).webm">WebM</a>,
<a href="@(Model.src).ogv">Ogg</a><br>
<!-- Support VideoJS by keeping this link. -->
<a href="http://videojs.com">HTML5 Video Player</a> by VideoJS
</p>
</div>
<!-- End VideoJS -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment