On Github heff / buffering
Created by David LaPalomento :: Lead Player Engineer at Brightcove Steve Heffernan :: Co-founder of Zencoder & Creator of Video.js
... <script src="myVideoPlayer.js"></script> </body> </html>
<script> var _vidq=[]; (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; g.src='myVideoPlayer.js'; s.parentNode.insertBefore(g,s)}(document,'script')); </script>
<div id="my_video_placeholder"></div> <script> var _vidq.push('my_video_placeholder'); </script>
var _vidqCopy = _vidq || []; _vidq = { push: function(placeholder_id){ // Player Initialization }; } _vidqCopy.forEach(_vidq.push);For video-specific pages. Think of a Youtube video page. The video is the main content and by the time you reach that page you intend to watch the video. The page is just a vehical for the video, with extra meta data like the title.
Your viewers will thank you for lying to them.
Run your own trials: github.com/brightcove/perception
PRELOAD: Use when you expect the user to watch the video on the page and you want it to load quickly.
AUTOPLAY: Use when the page is dedicated the video and you know the user will watch it.
With the load() method on the video element, you can trigger video loading sooner than the browser would normally.
<video id="vid1" src="myVideo.mp4"></video> <script> var vid1 = document.getElmentById('vid1'); vid1.load(); </script>
Know your audience.
\frac{bitrate}{bandwidth} < 1 \implies spinner
swap renditions during playback based on measured bandwidth
HLS is supported on iOS devices and newer Androids. HDS is supported in Flash.
David LaPalomento (@dlapalomento) Steve Heffernan (@heff)
This presentation is available at: http://heff.github.com/buffering
Help make the world safer for HTML video: github.com/videojs