Embedding audio/video in showoff presentations
Has anyone figured out a good way to embed video and audio int开发者_C百科o showoff presentations? Currently I am just putting video on youtube and linking to it like this in the slide:
!SLIDE full-page
# My Video
<iframe title="YouTube video player" width="640" height="410"
src="http://www.youtube.com/embed/oHg5SJYRHA0" frameborder="0"
allowfullscreen>
</iframe>
I was wondering if anyone had a better/more efficient way of putting in video and/or audio.
Thanks for the help!
You can host it yourself and try to leverage the browser's capabilities. Here's an approach:
<video controls width="360" height="240" poster="placeholder.jpg">
<source src="movie.ogv" type="video/ogg">
<source src="movie.mp4" type="video/mp4">
<object type="application/x-shockwave-flash" width="360" height="240" data="player.swf?file=movie.mp4">
<embed flashvars="file=movie.mp4"
allowfullscreen="true"
allowscriptaccess="always"
id="player1"
name="player1"
src="player.swf"
width="480"
height="270"
/>
<p>You need Flash or a modern browser to view this video</p>
</object>
</video>
It will try leveraging HTML5's video tag on browsers that support ogg or mp4. If that fails, it tries using flash (I used JW Player for this example, but it could be any other one). If all fails, it tells the viewer it needs flash or a modern browser.
Hope this helps.
精彩评论