On Github mmcc / devweek-kicking-plugins
Developer Week 2014
...but getting waaaay better
With examples from eBaum's World
Right-click, download as.
During this time, there was absolutely no standardization and there were a ton of different plugins being used everywhere.
<video src="video.mp4" controls=""></video>Make sure to point out that the controls shouldn't have the =""
<video controls=""> <source src="video.mp4" type="video/mp4"> <source src="video.webm" type="video/webm"> <source src="video.ogv" type="video/ogg"> <object type="application/x-shockwave-flash" data="flash.swf"> <param name="movie" value="flash.swf"> <param name="flashvars" value="file=video.mp4"> </object> </video>Make note of fallback being handled by a lot of players and delete the code
So what brought about the shift to HTML5 video at all?
The is / was thing is kinda wishful thinking* most some of the time
<video controls=""> <source src="video.mp4" type="video/mp4"> <source src="video.webm" type="video/webm"> <source src="video.ogv" type="video/ogg"> <track label="English" kind="subtitles" srclang="en" src="captions.vtt" default=""></track> </video>
WEBVTT 00:00.001 --> 00:04.000 Awwwww yeah. 00:04.001 --> 00:06.000 caption caption caption 00:06.001 --> 00:12.000 You're not limited to one line either - you can span multiple lines - just make sure none of those lines are empty 00:12.001 --> 00:16.000 Usually you don't want timestamps that overlap 00:15.000 --> 00:19.000 But it's ok if they do.
WEBVTT 00:00.001 --> 00:03.000 <u>Captions</u> <i>are</i> <b>cool</b> 00:03.001 --> 00:06.000 <c.blue-text>Especially when styled 00:06.001 --> 00:12.000 <v john="">Perhaps style each instance of a voice</v> 00:12.001 --> 00:17.000 That way you can make it easier to differentiate <v john="">- between when one person's captions</v> <v jane="">- And another</v> </c.blue-text>
video::cue(c.blue-text) { color: #b6dae6 } video::cue(v[voice="John"]) { color: yellow } video::cue(v[voice="Jane"]) { color: orange }
WEBVTT slide-1 00:00.001 --> 00:04.000 { "title": "JSON!", "description": "This is some awesome JSON. You could manipulate this with JS.", "image": "images/json.gif", "href": "http://json.org" }
<video controls=""> <source src="video.mp4" type="video/mp4"> <track label="json-stuff" kind="metadata" src="json.vtt"></track> </video>
var extraInfo = document.querySelector("#extra-info"); var videoElement = document.querySelector("video"); var textTracks = videoElement.textTracks; var textTrack = textTracks[0]; // since we only have one textTrack.oncuechange = function (){ var cue = this.activeCues[0]; if (cue) { var content; try { content = JSON.parse(cue.text); } catch (e) { return false; } console.log(content); if (content) { extraInfo.innerHTML = '<a href="'+ content.href +'" alt="'+ content.title +'">' + ' <h3>'+ content.title +'</h3>' + ' <img src="'+ content.image +'"><br>'+ ' <span>'+ content.description +'</span>' + '</a>'; } else { extraInfo.innerHTML = ''; } } }
An EME implementation consists of a...
To enable the playing of protected videos like feature-length Hollywood films, developers are forced to rely on plugins or non-standard browser extensions. As Adobe supports Open Web development more and more, we need to find a way to provide this capability to developers.
- Joe Steele, Sr. Computer Scientist at Adobe
We recognize the need for the W3C to respond to the changing landscape of the Web and to reconcile the interests of multiple parties. But ratifying EME would be an abdication of responsibility; it would harm interoperability, enshrine nonfree software in W3C standards and perpetuate oppressive business models.
Joint open letter to W3C
People want to watch video, including movies and TV shows. Browsers must provide the ability to watch video or the browser becomes less and less the tool users need. A number of content owners (in particular film and TV studios) require technical mechanisms to reduce the ways in which people can use that content, such as preventing people from making copies...Browsers must implement DRM in a way that makes the content owners comfortable. Otherwise they won’t allow their content to be viewed through that browser.
DRM and the challenge of serving users - Mitchell Baker (Mozilla)
EME is already being used in production!
WebRTC is a new front in the long war for an open and unencumbered web.
- Brendan Eich, inventor of JavaScript (via HTML5rocks.com)
navigator.getUserMedia({video: true, audio: false}, function(mediaStream) { var video = document.getElementById('get-user-media'); video.src = window.URL.createObjectURL(mediaStream); video.onloadedmetadata = function(e) { console.log('Locked and loaded.'); }; }, errCallback);
var webrtc = new SimpleWebRTC({ // the id/element dom element that will hold "our" video localVideoEl: 'localVideo', // the id/element dom element that will hold remote videos remoteVideosEl: 'remotesVideos', // immediately ask for camera access autoRequestMedia: true }); // we have to wait until it's ready webrtc.on('readyToCall', function () { // you can name it anything webrtc.joinRoom('your awesome room name'); });
SimpleWebRTC.com by &yet
Go to: http://mmcc.github.io/devweek-kicking-plugins/#/12/9
All are still vendor prefixed
And let us know if we can help