SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
HTML5 multimedia
Where we are, where we're going
Bruce Lawson
Anne van Kesteren annevk at opera.com
Wed Feb 28 05:47:56 PST 2007

Hi,
Opera has some internal expiremental builds with an implementation of a <video> element. The element
exposes a simple API (for the moment) much like the Audio() object:
  play()
  pause()
  Stop()

The idea is that it works like <object> except that it has special <video> semantics much like <img> has
image semantics. In markup you could prolly use it as follows:

 <figure>
  <video src=news-snippet.ogg>
   ...
  </video>
  <legend>HTML5 in BBC News</legend>
 </figure>

I attached a proposal for the element and as you can see there are still some open issues. The element and
its API are of course open for debate. We're not enforcing this upon the world ;-)

Cheers,
          http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-February/009702.html
<object width="425" height="344">
  <param name="movie"
value="http://www.example.com/v/9sEI1AUFJKw&hl=en
&fs=1&"></param>
  <param name="allowFullScreen"
value="true"></param>
  <param name="allowscriptaccess"
value="always"></param>
  <embed
src="http://www.example.com/v/9sEI1AUFJKw&hl=en&f
s=1&" type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true"
width="425" height="344"></embed>
</object>
<video src=pudding.webm
  controls
  autoplay
  poster=poster.jpg
  width=320 height=240>
    <a href=video.webm>Download movie</a>
</video>
<audio src=bieber.ogg
  controls
  autoplay>
     <a href=bieber.ogg>Download horrid pap</a>
</audio>
<video src=pudding.webm loop>
<audio   src=bieber.ogg   preload>
<audio   src=bieber.ogg   preload=auto>
<audio   src=bieber.ogg   preload=none>
<audio   src=bieber.ogg   preload=metadata>
video as native object...why is it important?

●
    keyboard accessibility built-in
●
    “play nice” with rest of the page
●
    Simple API for controls
"In addition to giving video an HTML
element, we must also agree on a baseline
video format that will be universally
supported, just like the GIF, JPEG and PNG
image format are universally supported. It's
important that the video format we choose
can be supported by a wide range of devices
and that it's royalty-free (RF). RF is a well-
established principle for W3C standards."
   http://people.opera.com/howcome/2007/video/
Ogg Theora




“free and open”, no licensing/royalties
not many tools for it, not web optimised
MP4 / H.264




ubiquitous, patent encumbered, licensing/royalties,
               hardware accelerated
WebM




"open and royalty-free", web optimised,
   hardware acceleration on its way
video formats

               webM            Ogg/ Theora    mp4/ h264

Opera            yes               yes

Chrome           yes               yes           Nope
                                             (Chrome.soon)
Firefox      Yes (FF4)             yes

Safari                                            yes

IE9       Yes (if installed)                      yes
The politics of codecs
audio formats

          mp3       Ogg/ Vobis   wav

Opera                  yes       yes

Chrome     yes         yes

Firefox                yes       yes

Safari     yes                   yes

IE9       yes                    yes
Giving everybody video

<video controls autoplay poster=… width=… height=…>
  <source src=pudding.mp4 type=video/mp4>
  <source src=pudding.webm type=video/webm>
  <!-- fallback content -->
</video>
<video controls poster="…" width="…" height="…">
   <source src="movie.mp4" type="video/mp4" />
   <source src="movie.webm" type="video/webm" />
   <source src="movie.ogv" type="video/ogg" />

   <object width="…" height="…" type="application/x-
shockwave-flash" data="player.swf">
      <param name="movie" value="player.swf" />
      <param name="flashvars" value=" … file=movie.mp4" />
      <!-- fallback content -->
   </object>

</video>




       still include fallback for old browsers
            http://camendesign.com/code/video_for_everybody
Help
●
    archive.org converts and hosts creative-commons
    licensed media
●   vid.ly has a free conversion/ hosting service (max 1GB
    source file) see vid.ly/5u4h3e
●   Miro video converter is a drag and drop GUI skin on
    FFMPEG
powerful (simple) API
www.w3.org/TR/html5/video.html#media-elements
controlling <video> with JavaScript
var v = document.getElementByTagName('video')
[0];

v.play();
v.pause();
v.volume = … ;
v.currentTime = … ;
…
events fired by <video>
var v = document.getElementById('player');

v.addEventListener('loadeddata', function() { … }, true)
v.addEventListener('play', function() { … }, true)
v.addEventListener('pause', function() { … }, true)
v.addEventListener('timeupdate', function() { … }, true)
v.addEventListener('ended', function() { … }, true)
…
Race condition:
html5demos.com/video
video media queries

<video controls>
<source src=hi-res.ogv media="(min-device-width:800px)">
<source src=lo-res.ogv>
</video>


http://dev.w3.org/html5/spec/video.html#the-source-element
Full-screen video
●
  Currently, WebkitEnterFullscreen();
●
  May 11, WebKit announced it's implementing Gecko API
  https://wiki.mozilla.org/Gecko:FullScreenAPI
●
  Opera likes this approach, too
<video> accessibility
WebM release does not support subtitles




WHATWG / W3C RFC will release guidance on subtitles and other
overlays in HTML5 <video> in the near future. WebM intends to follow
that guidance.




 http://code.google.com/p/webm/issues/detail?id=11
 Egg image Kacper "Kangel" Aniołek http://commons.wikimedia.org/wiki/File:Egg.jpg
<track> element

<video controls poster=… width=… height=…>
    <source src=movie.webm type=video/webm>
    <track src=subtitles-en.vtt kind=subtitles srclang=en>
    <track src=subtitles-de.vtt kind=subtitles srclang=de>
    <!-- fallback content -->
</video>


http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-track-element
webVTT
WEBVTT FILE

1
01:23:45,678 --> 01:23:46,789
Hello world!

2
01:23:48,910 --> 01:23:49,101
Hello
World!
www.iandevlin.com/blog/2011/05/html5/webvtt-and-video-subtitles
blog.gingertech.net/2011/03/29/webvtt-explained/
WebVTT formatting

            Supports positioning of text
               Supports <b> and <i>
           Colouring individual speakers
                 Support vertical text
                      Supports RTL
             Supports ruby annotations
http://www.whatwg.org/specs/web-apps/current-work/webvtt.html
<track> polyfill
http://www.delphiki.com/html5/playr/
Synchronising media elements
Each media element can have a MediaController. A MediaController is an object
that coordinates the playback of multiple media elements, for instance so that a
sign-language interpreter track can be overlaid on a video track, with the two
being kept in sync....
Media elements with a MediaController are said to be slaved to their controller. The
MediaController modifies the playback rate and the playback volume of each of the
media elements slaved to it, and ensures that when any of its slaved media
elements unexpectedly stall, the others are stopped at the same time.
When a media element is slaved to a MediaController, its playback rate is fixed to
that of the other tracks in the same MediaController, and any looping is disabled.
  http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#synchronising-
                                multiple-media-elements
             http://www.w3.org/WAI/PF/HTML/wiki/Media_Multitrack_Media_API
How mature is all this?
                               Looping latency
               people.opera.com/patrickl/experiments/audio/hacky-looper/

 HTML5 video issues on the iPad and how to solve them
blog.millermedeiros.com/2011/03/html5-video-issues-on-the-ipad-and-how-to-solve-them/

               Unsolved HTML5 video issues on iOS
      http://blog.millermedeiros.com/2011/04/unsolved-html5-video-issues-on-ios/

                  Audio Sprites (and fixes for iOS)
                      remysharp.com/2010/12/23/audio-sprites/
“...extending the language to better support Web
applications … This puts HTML in direct competition
with other technologies intended for applications deployed
over the Web, in particular Flash and Silverlight.”


Ian Hickson, Editor of HTML5
http://lists.w3.org/Archives/Public/public-html/2009Jan/0215.html
DRM on HTML5 without changes

                  Henri Sivonen
lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-
                  July/027051.html
getUserMedia API
(previously known as "HTML5 <device>")
<video autoplay></video>
<script>
var video = document.querySelector(video);


If (navigator.getUserMedia)
{navigator.getUserMedia('video',successCallback,
errorCallback);


function successCallback(stream) {
      video.src = stream;
  }
...
</script>
my.opera.com/core/blog/2011/03/23/webcam-orientation-preview
Thanks
 Mike Taylor @miketaylr for JS help, and Patrick Lauke
@patrick_h_lauke for the Hixie voice. (What does that "H"
                      stand for?)


 Ian Devlin @iandevlin and Silvia Pfeiffer @silviapfeiffer for
                      webVTT advice


 Philip Jägenstedt @foolip and Simon Pieters @zcorpan for
implementing/ QA-ing multimedia in Opera and explaining it
                to me slowly and patiently

Más contenido relacionado

La actualidad más candente

JS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosJS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosGreg Schechter
 
HTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosHTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosGreg Schechter
 
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010Patrick Lauke
 
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012Patrick Lauke
 
5 Things You Need to Know to Start Using Video and Audio Today
5 Things You Need to Know to Start Using Video and Audio Today5 Things You Need to Know to Start Using Video and Audio Today
5 Things You Need to Know to Start Using Video and Audio TodayNigel Parker
 
I Pod In Education
I Pod In EducationI Pod In Education
I Pod In EducationLinda Rush
 
Creating Integrating Video
Creating Integrating VideoCreating Integrating Video
Creating Integrating Videogetchan
 
HTML55 media api
HTML55 media apiHTML55 media api
HTML55 media apiRan Bar-Zik
 
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...Patrick Lauke
 
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet![edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!Christopher Schmitt
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch
 
Why Open Web Standards are cool and will save the world. Or the Web, at least.
Why Open Web Standards are cool and will save the world. Or the Web, at least.Why Open Web Standards are cool and will save the world. Or the Web, at least.
Why Open Web Standards are cool and will save the world. Or the Web, at least.brucelawson
 
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan PolandBruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Polandbrucelawson
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-airbrucelawson
 

La actualidad más candente (20)

JS Days Mobile Meow
JS Days Mobile MeowJS Days Mobile Meow
JS Days Mobile Meow
 
JS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat VideosJS Days HTML5 Flash and the Battle for Faster Cat Videos
JS Days HTML5 Flash and the Battle for Faster Cat Videos
 
HTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat VideosHTML5, Flash, and the Battle For Faster Cat Videos
HTML5, Flash, and the Battle For Faster Cat Videos
 
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
audio, video and canvas in HTML5 - standards>next Manchester 29.09.2010
 
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012
HTML5 multimedia - browser-native video and audio - JSDay / Verona / 17 May 2012
 
5 Things You Need to Know to Start Using Video and Audio Today
5 Things You Need to Know to Start Using Video and Audio Today5 Things You Need to Know to Start Using Video and Audio Today
5 Things You Need to Know to Start Using Video and Audio Today
 
I Pod In Education
I Pod In EducationI Pod In Education
I Pod In Education
 
Vkmdp cologne
Vkmdp cologneVkmdp cologne
Vkmdp cologne
 
Creating Integrating Video
Creating Integrating VideoCreating Integrating Video
Creating Integrating Video
 
HTML55 media api
HTML55 media apiHTML55 media api
HTML55 media api
 
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...
HTML5 multimedia - browser-native video and audio - DevUp HTML5 / Barcelona /...
 
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet![edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
[edUiconf] HTML5 does all that… and i can haz cheeseburger? You bet!
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3[amigos] HTML5 and CSS3
[amigos] HTML5 and CSS3
 
Why Open Web Standards are cool and will save the world. Or the Web, at least.
Why Open Web Standards are cool and will save the world. Or the Web, at least.Why Open Web Standards are cool and will save the world. Or the Web, at least.
Why Open Web Standards are cool and will save the world. Or the Web, at least.
 
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan PolandBruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
 
Web Apps
Web AppsWeb Apps
Web Apps
 
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
 
HTML5 Design
HTML5 DesignHTML5 Design
HTML5 Design
 

Destacado

Sampah dan kesehatan masyarakat
Sampah dan kesehatan masyarakatSampah dan kesehatan masyarakat
Sampah dan kesehatan masyarakatAditiaKinugasa
 
Resume gingivitis dwi rama
Resume gingivitis dwi ramaResume gingivitis dwi rama
Resume gingivitis dwi ramaAfiz Zullah
 
fungsi gigi by erlinarla dental nurse
fungsi gigi by erlinarla dental nursefungsi gigi by erlinarla dental nurse
fungsi gigi by erlinarla dental nurseerlin arla
 
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...Adi Sodikin
 
Pengertian, Fungsi dan Jenis Lingkungan Pendidikan
Pengertian, Fungsi dan Jenis Lingkungan PendidikanPengertian, Fungsi dan Jenis Lingkungan Pendidikan
Pengertian, Fungsi dan Jenis Lingkungan PendidikanHariyatunnisa Ahmad
 
109530090 makalah-modul-3-fix-1-1
109530090 makalah-modul-3-fix-1-1109530090 makalah-modul-3-fix-1-1
109530090 makalah-modul-3-fix-1-1hasril hasanuddin
 
Proposal pelayanan kesehatan_gigi_dan_mu
Proposal pelayanan kesehatan_gigi_dan_muProposal pelayanan kesehatan_gigi_dan_mu
Proposal pelayanan kesehatan_gigi_dan_muAlfian Yanda
 
Laeflet perawatan gigi dan mulut
Laeflet perawatan gigi dan mulutLaeflet perawatan gigi dan mulut
Laeflet perawatan gigi dan mulutaskep33
 
Pencegahan Perawatan penyakit gigi & mulut
Pencegahan  Perawatan penyakit gigi & mulutPencegahan  Perawatan penyakit gigi & mulut
Pencegahan Perawatan penyakit gigi & mulutAntam Medika
 
Leaflet personal hygiene
Leaflet personal hygieneLeaflet personal hygiene
Leaflet personal hygieneaskep33
 
Metode pengumpulan data
Metode pengumpulan dataMetode pengumpulan data
Metode pengumpulan dataZamhari Hadi
 
Manfaat mencuci tangan untuk mengurangi penyakit diare
Manfaat mencuci tangan untuk mengurangi penyakit diareManfaat mencuci tangan untuk mengurangi penyakit diare
Manfaat mencuci tangan untuk mengurangi penyakit diaretiarakusumaningrum
 
Panduan praktik klinik bagi dokter gigi dari pb pdgi
Panduan praktik klinik bagi dokter gigi dari pb pdgiPanduan praktik klinik bagi dokter gigi dari pb pdgi
Panduan praktik klinik bagi dokter gigi dari pb pdgidentalid
 

Destacado (20)

Latihan workshop ptk eci heliza
Latihan workshop ptk eci helizaLatihan workshop ptk eci heliza
Latihan workshop ptk eci heliza
 
Kuisioner bdi
Kuisioner bdiKuisioner bdi
Kuisioner bdi
 
Bab iii
Bab iiiBab iii
Bab iii
 
Sap posyandu
Sap posyanduSap posyandu
Sap posyandu
 
kasus gigi
kasus gigikasus gigi
kasus gigi
 
Sampah dan kesehatan masyarakat
Sampah dan kesehatan masyarakatSampah dan kesehatan masyarakat
Sampah dan kesehatan masyarakat
 
Resume gingivitis dwi rama
Resume gingivitis dwi ramaResume gingivitis dwi rama
Resume gingivitis dwi rama
 
fungsi gigi by erlinarla dental nurse
fungsi gigi by erlinarla dental nursefungsi gigi by erlinarla dental nurse
fungsi gigi by erlinarla dental nurse
 
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...
(Pgpaud) efektivitas metode bercerita dengan buku cerita bergambar dalam meni...
 
Pengertian, Fungsi dan Jenis Lingkungan Pendidikan
Pengertian, Fungsi dan Jenis Lingkungan PendidikanPengertian, Fungsi dan Jenis Lingkungan Pendidikan
Pengertian, Fungsi dan Jenis Lingkungan Pendidikan
 
109530090 makalah-modul-3-fix-1-1
109530090 makalah-modul-3-fix-1-1109530090 makalah-modul-3-fix-1-1
109530090 makalah-modul-3-fix-1-1
 
Proposal pelayanan kesehatan_gigi_dan_mu
Proposal pelayanan kesehatan_gigi_dan_muProposal pelayanan kesehatan_gigi_dan_mu
Proposal pelayanan kesehatan_gigi_dan_mu
 
Laeflet perawatan gigi dan mulut
Laeflet perawatan gigi dan mulutLaeflet perawatan gigi dan mulut
Laeflet perawatan gigi dan mulut
 
Pencegahan Perawatan penyakit gigi & mulut
Pencegahan  Perawatan penyakit gigi & mulutPencegahan  Perawatan penyakit gigi & mulut
Pencegahan Perawatan penyakit gigi & mulut
 
Leaflet personal hygiene
Leaflet personal hygieneLeaflet personal hygiene
Leaflet personal hygiene
 
Materi sap
Materi sapMateri sap
Materi sap
 
Metode pengumpulan data
Metode pengumpulan dataMetode pengumpulan data
Metode pengumpulan data
 
Rencana penyuluhan kesehatan
Rencana penyuluhan kesehatanRencana penyuluhan kesehatan
Rencana penyuluhan kesehatan
 
Manfaat mencuci tangan untuk mengurangi penyakit diare
Manfaat mencuci tangan untuk mengurangi penyakit diareManfaat mencuci tangan untuk mengurangi penyakit diare
Manfaat mencuci tangan untuk mengurangi penyakit diare
 
Panduan praktik klinik bagi dokter gigi dari pb pdgi
Panduan praktik klinik bagi dokter gigi dari pb pdgiPanduan praktik klinik bagi dokter gigi dari pb pdgi
Panduan praktik klinik bagi dokter gigi dari pb pdgi
 

Similar a HTML5 Multimedia: where we are, where we're going

Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioChristian Heilmann
 
HTML5 and Accessibility sitting in a tree
HTML5 and Accessibility sitting in a treeHTML5 and Accessibility sitting in a tree
HTML5 and Accessibility sitting in a treebrucelawson
 
Html5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationHtml5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationMatthew Fabb
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5Todd Anglin
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerWalter Ebert
 
2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 videoMediaMosa
 
HTML5 video & Amazon elastic transcoder - FCIP August 2014
HTML5 video & Amazon elastic transcoder - FCIP August 2014HTML5 video & Amazon elastic transcoder - FCIP August 2014
HTML5 video & Amazon elastic transcoder - FCIP August 2014RZasadzinski
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Designtclanton4
 
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...Patrick Lauke
 
GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGreg Schechter
 
HTML5 and video
HTML5 and videoHTML5 and video
HTML5 and videoMediaMosa
 
Craft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesCraft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesMáté Nádasdi
 
Web Directions @media 2010
Web Directions @media 2010Web Directions @media 2010
Web Directions @media 2010Patrick Lauke
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentationvs4vijay
 

Similar a HTML5 Multimedia: where we are, where we're going (20)

Multimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audioMultimedia on the web - HTML5 video and audio
Multimedia on the web - HTML5 video and audio
 
HTML 5
HTML 5HTML 5
HTML 5
 
HTML5 and Accessibility sitting in a tree
HTML5 and Accessibility sitting in a treeHTML5 and Accessibility sitting in a tree
HTML5 and Accessibility sitting in a tree
 
Html5video
Html5videoHtml5video
Html5video
 
Html5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationHtml5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentation
 
The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5The Rich Standard: Getting Familiar with HTML5
The Rich Standard: Getting Familiar with HTML5
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder weniger
 
2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video
 
HTML5 video & Amazon elastic transcoder - FCIP August 2014
HTML5 video & Amazon elastic transcoder - FCIP August 2014HTML5 video & Amazon elastic transcoder - FCIP August 2014
HTML5 video & Amazon elastic transcoder - FCIP August 2014
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Design
 
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
HTML5 APIs - native multimedia support and beyond - University of Leeds 05.05...
 
GDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat VideosGDD HTML5, Flash, and the Battle for Faster Cat Videos
GDD HTML5, Flash, and the Battle for Faster Cat Videos
 
HTML5 and video
HTML5 and videoHTML5 and video
HTML5 and video
 
Web DU Mobile Meow
Web DU Mobile MeowWeb DU Mobile Meow
Web DU Mobile Meow
 
Craft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologiesCraft 2019 - “The Upside Down” Of The Web - Video technologies
Craft 2019 - “The Upside Down” Of The Web - Video technologies
 
Echo HTML5
Echo HTML5Echo HTML5
Echo HTML5
 
Web Directions @media 2010
Web Directions @media 2010Web Directions @media 2010
Web Directions @media 2010
 
Lesson 6
Lesson 6Lesson 6
Lesson 6
 
HTML5 Presentation
HTML5 PresentationHTML5 Presentation
HTML5 Presentation
 
HTML 5
HTML 5HTML 5
HTML 5
 

Más de brucelawson

Bruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of AppsBruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of Appsbrucelawson
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why howbrucelawson
 
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011brucelawson
 
Leveraging HTML 5.0
Leveraging HTML 5.0Leveraging HTML 5.0
Leveraging HTML 5.0brucelawson
 
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScriptWeb Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScriptbrucelawson
 
W3C Widgets: Apps made with Web Standards
W3C Widgets: Apps made with Web StandardsW3C Widgets: Apps made with Web Standards
W3C Widgets: Apps made with Web Standardsbrucelawson
 
Bruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japanBruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japanbrucelawson
 
Html5 oslo-code-camp
Html5 oslo-code-campHtml5 oslo-code-camp
Html5 oslo-code-campbrucelawson
 
Bruce lawson Stockholm Geek Meet
Bruce lawson Stockholm Geek MeetBruce lawson Stockholm Geek Meet
Bruce lawson Stockholm Geek Meetbrucelawson
 
Bruce Lawson HTML5 South By SouthWest presentation
Bruce Lawson HTML5 South By SouthWest presentationBruce Lawson HTML5 South By SouthWest presentation
Bruce Lawson HTML5 South By SouthWest presentationbrucelawson
 
Practical Tips for Mobile Widget development
Practical Tips for Mobile Widget developmentPractical Tips for Mobile Widget development
Practical Tips for Mobile Widget developmentbrucelawson
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesiabrucelawson
 
Standards.next: HTML - Are you mything the point?
Standards.next: HTML - Are you mything the point?Standards.next: HTML - Are you mything the point?
Standards.next: HTML - Are you mything the point?brucelawson
 

Más de brucelawson (15)

Bruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of AppsBruce Lawson: Progressive Web Apps: the future of Apps
Bruce Lawson: Progressive Web Apps: the future of Apps
 
HTML5 Who what where when why how
HTML5 Who what where when why howHTML5 Who what where when why how
HTML5 Who what where when why how
 
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011
You too can be a bedwetting antfucker: Bruce Lawson, Opera, Fronteers 2011
 
Leveraging HTML 5.0
Leveraging HTML 5.0Leveraging HTML 5.0
Leveraging HTML 5.0
 
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScriptWeb Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript
Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript
 
W3C Widgets: Apps made with Web Standards
W3C Widgets: Apps made with Web StandardsW3C Widgets: Apps made with Web Standards
W3C Widgets: Apps made with Web Standards
 
Bruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japanBruce lawson-html5-aria-japan
Bruce lawson-html5-aria-japan
 
HTML5 and CSS 3
HTML5 and CSS 3HTML5 and CSS 3
HTML5 and CSS 3
 
Html5 oslo-code-camp
Html5 oslo-code-campHtml5 oslo-code-camp
Html5 oslo-code-camp
 
Disruptive code
Disruptive codeDisruptive code
Disruptive code
 
Bruce lawson Stockholm Geek Meet
Bruce lawson Stockholm Geek MeetBruce lawson Stockholm Geek Meet
Bruce lawson Stockholm Geek Meet
 
Bruce Lawson HTML5 South By SouthWest presentation
Bruce Lawson HTML5 South By SouthWest presentationBruce Lawson HTML5 South By SouthWest presentation
Bruce Lawson HTML5 South By SouthWest presentation
 
Practical Tips for Mobile Widget development
Practical Tips for Mobile Widget developmentPractical Tips for Mobile Widget development
Practical Tips for Mobile Widget development
 
Bruce Lawson Opera Indonesia
Bruce Lawson Opera IndonesiaBruce Lawson Opera Indonesia
Bruce Lawson Opera Indonesia
 
Standards.next: HTML - Are you mything the point?
Standards.next: HTML - Are you mything the point?Standards.next: HTML - Are you mything the point?
Standards.next: HTML - Are you mything the point?
 

HTML5 Multimedia: where we are, where we're going

  • 1. HTML5 multimedia Where we are, where we're going Bruce Lawson
  • 2. Anne van Kesteren annevk at opera.com Wed Feb 28 05:47:56 PST 2007 Hi, Opera has some internal expiremental builds with an implementation of a <video> element. The element exposes a simple API (for the moment) much like the Audio() object: play() pause() Stop() The idea is that it works like <object> except that it has special <video> semantics much like <img> has image semantics. In markup you could prolly use it as follows: <figure> <video src=news-snippet.ogg> ... </video> <legend>HTML5 in BBC News</legend> </figure> I attached a proposal for the element and as you can see there are still some open issues. The element and its API are of course open for debate. We're not enforcing this upon the world ;-) Cheers, http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2007-February/009702.html
  • 3. <object width="425" height="344"> <param name="movie" value="http://www.example.com/v/9sEI1AUFJKw&hl=en &fs=1&"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.example.com/v/9sEI1AUFJKw&hl=en&f s=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed> </object>
  • 4. <video src=pudding.webm controls autoplay poster=poster.jpg width=320 height=240> <a href=video.webm>Download movie</a> </video>
  • 5. <audio src=bieber.ogg controls autoplay> <a href=bieber.ogg>Download horrid pap</a> </audio>
  • 7. <audio src=bieber.ogg preload> <audio src=bieber.ogg preload=auto> <audio src=bieber.ogg preload=none> <audio src=bieber.ogg preload=metadata>
  • 8. video as native object...why is it important? ● keyboard accessibility built-in ● “play nice” with rest of the page ● Simple API for controls
  • 9. "In addition to giving video an HTML element, we must also agree on a baseline video format that will be universally supported, just like the GIF, JPEG and PNG image format are universally supported. It's important that the video format we choose can be supported by a wide range of devices and that it's royalty-free (RF). RF is a well- established principle for W3C standards." http://people.opera.com/howcome/2007/video/
  • 10. Ogg Theora “free and open”, no licensing/royalties not many tools for it, not web optimised
  • 11. MP4 / H.264 ubiquitous, patent encumbered, licensing/royalties, hardware accelerated
  • 12. WebM "open and royalty-free", web optimised, hardware acceleration on its way
  • 13. video formats webM Ogg/ Theora mp4/ h264 Opera yes yes Chrome yes yes Nope (Chrome.soon) Firefox Yes (FF4) yes Safari yes IE9 Yes (if installed) yes
  • 14. The politics of codecs
  • 15. audio formats mp3 Ogg/ Vobis wav Opera yes yes Chrome yes yes Firefox yes yes Safari yes yes IE9 yes yes
  • 16. Giving everybody video <video controls autoplay poster=… width=… height=…> <source src=pudding.mp4 type=video/mp4> <source src=pudding.webm type=video/webm> <!-- fallback content --> </video>
  • 17. <video controls poster="…" width="…" height="…"> <source src="movie.mp4" type="video/mp4" /> <source src="movie.webm" type="video/webm" /> <source src="movie.ogv" type="video/ogg" /> <object width="…" height="…" type="application/x- shockwave-flash" data="player.swf"> <param name="movie" value="player.swf" /> <param name="flashvars" value=" … file=movie.mp4" /> <!-- fallback content --> </object> </video> still include fallback for old browsers http://camendesign.com/code/video_for_everybody
  • 18. Help ● archive.org converts and hosts creative-commons licensed media ● vid.ly has a free conversion/ hosting service (max 1GB source file) see vid.ly/5u4h3e ● Miro video converter is a drag and drop GUI skin on FFMPEG
  • 21. controlling <video> with JavaScript var v = document.getElementByTagName('video') [0]; v.play(); v.pause(); v.volume = … ; v.currentTime = … ; …
  • 22. events fired by <video> var v = document.getElementById('player'); v.addEventListener('loadeddata', function() { … }, true) v.addEventListener('play', function() { … }, true) v.addEventListener('pause', function() { … }, true) v.addEventListener('timeupdate', function() { … }, true) v.addEventListener('ended', function() { … }, true) …
  • 24. video media queries <video controls> <source src=hi-res.ogv media="(min-device-width:800px)"> <source src=lo-res.ogv> </video> http://dev.w3.org/html5/spec/video.html#the-source-element
  • 25. Full-screen video ● Currently, WebkitEnterFullscreen(); ● May 11, WebKit announced it's implementing Gecko API https://wiki.mozilla.org/Gecko:FullScreenAPI ● Opera likes this approach, too
  • 27. WebM release does not support subtitles WHATWG / W3C RFC will release guidance on subtitles and other overlays in HTML5 <video> in the near future. WebM intends to follow that guidance. http://code.google.com/p/webm/issues/detail?id=11 Egg image Kacper "Kangel" Aniołek http://commons.wikimedia.org/wiki/File:Egg.jpg
  • 28. <track> element <video controls poster=… width=… height=…> <source src=movie.webm type=video/webm> <track src=subtitles-en.vtt kind=subtitles srclang=en> <track src=subtitles-de.vtt kind=subtitles srclang=de> <!-- fallback content --> </video> http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-track-element
  • 29. webVTT WEBVTT FILE 1 01:23:45,678 --> 01:23:46,789 Hello world! 2 01:23:48,910 --> 01:23:49,101 Hello World! www.iandevlin.com/blog/2011/05/html5/webvtt-and-video-subtitles blog.gingertech.net/2011/03/29/webvtt-explained/
  • 30. WebVTT formatting Supports positioning of text Supports <b> and <i> Colouring individual speakers Support vertical text Supports RTL Supports ruby annotations http://www.whatwg.org/specs/web-apps/current-work/webvtt.html
  • 32. Synchronising media elements Each media element can have a MediaController. A MediaController is an object that coordinates the playback of multiple media elements, for instance so that a sign-language interpreter track can be overlaid on a video track, with the two being kept in sync.... Media elements with a MediaController are said to be slaved to their controller. The MediaController modifies the playback rate and the playback volume of each of the media elements slaved to it, and ensures that when any of its slaved media elements unexpectedly stall, the others are stopped at the same time. When a media element is slaved to a MediaController, its playback rate is fixed to that of the other tracks in the same MediaController, and any looping is disabled. http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#synchronising- multiple-media-elements http://www.w3.org/WAI/PF/HTML/wiki/Media_Multitrack_Media_API
  • 33. How mature is all this? Looping latency people.opera.com/patrickl/experiments/audio/hacky-looper/ HTML5 video issues on the iPad and how to solve them blog.millermedeiros.com/2011/03/html5-video-issues-on-the-ipad-and-how-to-solve-them/ Unsolved HTML5 video issues on iOS http://blog.millermedeiros.com/2011/04/unsolved-html5-video-issues-on-ios/ Audio Sprites (and fixes for iOS) remysharp.com/2010/12/23/audio-sprites/
  • 34. “...extending the language to better support Web applications … This puts HTML in direct competition with other technologies intended for applications deployed over the Web, in particular Flash and Silverlight.” Ian Hickson, Editor of HTML5 http://lists.w3.org/Archives/Public/public-html/2009Jan/0215.html
  • 35. DRM on HTML5 without changes Henri Sivonen lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010- July/027051.html
  • 36. getUserMedia API (previously known as "HTML5 <device>")
  • 37. <video autoplay></video> <script> var video = document.querySelector(video); If (navigator.getUserMedia) {navigator.getUserMedia('video',successCallback, errorCallback); function successCallback(stream) { video.src = stream; } ... </script>
  • 39. Thanks Mike Taylor @miketaylr for JS help, and Patrick Lauke @patrick_h_lauke for the Hixie voice. (What does that "H" stand for?) Ian Devlin @iandevlin and Silvia Pfeiffer @silviapfeiffer for webVTT advice Philip Jägenstedt @foolip and Simon Pieters @zcorpan for implementing/ QA-ing multimedia in Opera and explaining it to me slowly and patiently