On Github janson / presentation-html5
Janson Hartliep - @_janson_
<audio src="audio.mp3" preload="auto" controls=""></audio>
<video controls=""> <source src="foo.ogg" type="video/ogg"> <source src="foo.mp4" type="video/mp4"> </video>
<img src="image.svg" alt="oooohhhh yeahhhhh">
But remember! Autoplay is bad, mmmkay?
<audio controls="" preload="auto" autoplay=""> <source src="elvis.mp3"> <source src="elvis.ogg"> <!-- now include flash fall back --> </audio>
Ogg and MP3
https://www.scirra.com/blog/44/on-html5-audio-formats-aac-and-ogg
For now, polyfill: http://kolber.github.io/audiojs/
Limited CSS attached just to the controls.
Controls are styled just like form elements - painfully
No controls? Use Javacript to kick off audio's events.
<video src="video.mp4" controls="" autobuffer=""> </video>
http://developers.whatwg.org/the-video-element.html#the-video-element
This is why we can't have nice things.
Just use http://www.mirovideoconverter.com/
<video width="640" height="360" controls=""> <source src="__VIDEO__.MP4" type="video/mp4"> <source src="__VIDEO__.OGV" type="video/ogg"> <object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF"> <param name="movie" value="__FLASH__.SWF"> <param name="flashvars" value="controlbar=over&image=__POSTER__.JPG&file=__VIDEO__.MP4"> <img src="__VIDEO__.JPG" width="640" height="360" alt="__TITLE__" title="No video playback capabilities, please download the video below"> </object> </video> <p> Closed Format: <a href="__VIDEO__.MP4" class="roll"><span data-title=""MP4"">"MP4"</span></a> Open Format: <a href="__VIDEO__.OGV" class="roll"><span data-title=""Ogg"">"Ogg"</span></a> </p>
camendesign.com/code/video_for_everybodyno scripting, FLASH fallback in pure markup
video { max-width: 100%; height: auto; }
or:fitvidsjs
<img alt="The Breakfast Combo" src="banner.jpeg" srcset="banner-HD.jpeg 2x, banner-phone.jpeg 100w, banner-phone-HD.jpeg 100w 2x">
<picture width="500" height="500"> <source media="(min-width: 45em)" src="large.jpg"> <source media="(min-width: 18em)" src="med.jpg"> <source src="small.jpg"> <img src="small.jpg" alt=""> <p>Accessible text</p> </picture>
Spoiler! These are unintuitive, unimplemented, draft ideas.
"WebP is a new image format that provides lossless and lossy compression for images on the web."
By Google
img { max-width: 100%; }
Thanks! @_janson_