SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
<audio     <video
src=       src=       The url to the audio or video
           width=     The width of the video element
           height=    The height of the video element
           poster=    The url to the thumbnail of the video
preload=   preload=   (none, metadata, auto) Start downloading
autoplay   autoplay   Audio or video should play immediately
loop       loop       Audio or video should return to start and play
controls   controls   Will show controls (play, pause, scrub bar)
>          >
…          …
</audio>   </video>
!
    !                                                            *
*

                                       Chrome is removing support for H.264

        *   If WebM is installed   !   Microsoft released a H.264 Extension for Chrome on Windows 7
You Need More Than One
You Need Both Big & Small
Unlikely To Change Anytime Soon
<video controls>
<source src=hi-res.mp4 type=‘video/mp4;
   codecs="avc1.64001E, mp4a.40.2"’
   media="(min-device-width: 800px)">
<source src=lo-res.mp4 type=‘video/mp4;
   codecs="avc1.42E01E, mp4a.40.2"’>
<source src=hi-res.ogv type=‘video/ogg;
   codecs="theora, vorbis"’
   media="(min-device-width: 800px)">
<source src=lo-res.ogv type=‘video/ogg;
   codecs="theora, vorbis"’>
fall-back content only displayed by browsers that
do not support the <video> element
</video>
  Due to bug in iPhone/iPad iOS 3.x, mp4 should always be first
Encoding Optimizations
Offload Encoding to the Cloud
HTTP 1.1-compatible
web server




Seek Ahead
Bit Rate Throttling
Broadcast in HD Where Available




by Jo Christian Oterhals
Video Corruption – Dropped Frames
Are there encoding settings that we
can use to reduce corruption?
Baseline *                                                                          High
      Larger file                                    Main                            Smaller File
      Less CPU to Decode                                                             More CPU to Decode
      Quick to Encode                                                                Longer to Encode




baseline profile must be main profile compatible to support DirectX Video Acceleration
Typical Group Of Pictures
(GOP) structure
Styling with Canvas & CSS
Drawing with Canvas
Drawing with Canvas
   Hide the Video display a Canvas
  <div style="display:none">
     <video id="sourcevid" autoplay preload="auto" width="1920"
     onloadedmetadata="init()">
  </div>
  <canvas id="output" width="960" height="540"></canvas>
function init() {
       video = document.getElementById('sourcevid');
       var outputcanvas = document.getElementById('output');
       draw = outputcanvas.getContext('2d');
       setInterval("processFrame()", 33); // 30 fps
}

   30 times per second draw the cropped video onto canvas
function processFrame() {
       // manipulate image here cropping and scaling as needed
       draw.drawImage(video, cX, cY, w, h, 0, 0, w, h);
}
video {
  position: relative;
  border-radius:
  200px 50px 200px 50px;
  box-shadow:
  #244766 10px 10px 10px;
  transform: rotate(5deg)
  translate(15px,10px);
}
Styling Custom Controls
Custom Skinnable Players
 Media Element Methods
    play(), pause(), load(), canPlayType()

 Media Element Events

    video.addEventListener('play',
    function() {
      play.title = 'pause';
      play.innerHTML = 'ǁ';
    }, false);
Custom Controls
Going Full Screen
Going Full Screen
HTML5 Community Players
A Comparison of HTML5 Video Players
                                                      Flash
Name              Licence        JavaScript Library                iOS                    Full screen        Keyboard          Subtitles   easy to integrate easy to theme
                                                      fallback
Projekktor        GPL 3          jQuery               yes          yes                    noish              –                 –           yes              yes

FlareVideo        MIT            jQuery               yes          –                      yes*               play/ pause ***   –           yes              yes

Video JS          GPL 3          –                    yes          yes                    yes                –                 yes         yes              yes
JW Player         custom         –                    yes          yes                    yes                –                 –           yes              yes
Kaltura / Adobe   GPL 2          jQuery               yes          yes                    browser window     –                 –           yes              yes
html5media        GPL 3          –                    yes          yes                    yes*               –                 –           yes              –
jMediaelement     MIT            jQuery               yes          yes                    with plugin        yes               yes         yes              yes
OIPlayer          GPL 3          jQuery               yes          yes                    browser window     –                 –           noish            yes

HVideo            custom         jQuery               –            yes                    yes*               play/ pause ***   –           noish            yes

jQuery Video      ?              jQuery               –            –                      –                  –                 –           yes              –
Video for
                  CC             –                    yes          yes                    yes*               –                 –           yes              –
Everybody
Open Video
                  custom         jQuery               yes          yes                    browser window     –                 –           –                maybe
Player
HTML5 Video
                  ?              MooTools             –            yes                    –                  –                 –           yes              yes
Player
mediaelement.js   GPLv2 MIT      jQuery               yes          yes                    yes                –                 yes         yes              yes
SublimeVideo **   paid service                        yes          yes                    cmd/ctrl + click   –                 –           hell yes         –
Uppod.HTML5       ?              –                    includable   yes                    browser window     pause ***         –           yes              no
LeanBack          own            –                    yes          yes                    yes                yes               yes         yes              yes
Mooplay           GPL 3          MooTools             no           yes                    browser window     –                 yes         noish            yes
jPlayer           MIT and GPL    jQuery               yes          yes                    -                  –                 -           yes              yes

OSM Player        GPL 3          jQuery               yes          triple click to play   browser window     –                 –           hell no          –

             #videosws
A Selection of HTML5 Video Players
  Sublime Video – Player as a Service   mediaelement.js




  LeanBack Player – Keyboard Support    JW Player
Everything You Need to Know About HTML5 Video
Everything You Need to Know About HTML5 Video

Contenu connexe

Similaire à Everything You Need to Know About HTML5 Video

Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video TutorialSilvia Pfeiffer
 
Video Production Using Open Source Tools
Video Production Using Open Source ToolsVideo Production Using Open Source Tools
Video Production Using Open Source ToolsCrazed Mule
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video PlayerJim Jeffers
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibilitybrucelawson
 
Drupal Video Presentation
Drupal Video PresentationDrupal Video Presentation
Drupal Video PresentationEric Michalsen
 
Simple tricks to improve the performance of your site
Simple tricks to improve the performance of your siteSimple tricks to improve the performance of your site
Simple tricks to improve the performance of your siteMauricio Gelves
 
HTML Media: Where We Are & Where We Need To Go
HTML Media: Where We Are & Where We Need To GoHTML Media: Where We Are & Where We Need To Go
HTML Media: Where We Are & Where We Need To GoNigel Parker
 
Responsive browser-based video recording and playback
Responsive browser-based video recording and playbackResponsive browser-based video recording and playback
Responsive browser-based video recording and playbackOliver Friedmann
 
StoryCode Immersion #5 - Popcorn.JS Deep Dive
StoryCode Immersion #5 - Popcorn.JS Deep DiveStoryCode Immersion #5 - Popcorn.JS Deep Dive
StoryCode Immersion #5 - Popcorn.JS Deep Divestorycode
 
[1C5]Lessons from developing a web browser for raspberry pi
[1C5]Lessons from developing a web browser for raspberry pi[1C5]Lessons from developing a web browser for raspberry pi
[1C5]Lessons from developing a web browser for raspberry piNAVER D2
 
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
 
Internet Archive Video Presentation
Internet Archive Video Presentation Internet Archive Video Presentation
Internet Archive Video Presentation tracey jaquith
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0Amir Zmora
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentationsith33
 
WebRTC Live Q&A and Screen Capture session 3
WebRTC Live Q&A and Screen Capture session 3WebRTC Live Q&A and Screen Capture session 3
WebRTC Live Q&A and Screen Capture session 3Amir Zmora
 

Similaire à Everything You Need to Know About HTML5 Video (20)

Html5video
Html5videoHtml5video
Html5video
 
Video Meets Documentation
Video Meets DocumentationVideo Meets Documentation
Video Meets Documentation
 
Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video Tutorial
 
Video Production Using Open Source Tools
Video Production Using Open Source ToolsVideo Production Using Open Source Tools
Video Production Using Open Source Tools
 
Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
HTML5 Multimedia Accessibility
HTML5 Multimedia AccessibilityHTML5 Multimedia Accessibility
HTML5 Multimedia Accessibility
 
Php2pdf
Php2pdfPhp2pdf
Php2pdf
 
Drupal Video Presentation
Drupal Video PresentationDrupal Video Presentation
Drupal Video Presentation
 
Simple tricks to improve the performance of your site
Simple tricks to improve the performance of your siteSimple tricks to improve the performance of your site
Simple tricks to improve the performance of your site
 
HTML Media: Where We Are & Where We Need To Go
HTML Media: Where We Are & Where We Need To GoHTML Media: Where We Are & Where We Need To Go
HTML Media: Where We Are & Where We Need To Go
 
Responsive browser-based video recording and playback
Responsive browser-based video recording and playbackResponsive browser-based video recording and playback
Responsive browser-based video recording and playback
 
StoryCode Immersion #5 - Popcorn.JS Deep Dive
StoryCode Immersion #5 - Popcorn.JS Deep DiveStoryCode Immersion #5 - Popcorn.JS Deep Dive
StoryCode Immersion #5 - Popcorn.JS Deep Dive
 
JS Days Mobile Meow
JS Days Mobile MeowJS Days Mobile Meow
JS Days Mobile Meow
 
[1C5]Lessons from developing a web browser for raspberry pi
[1C5]Lessons from developing a web browser for raspberry pi[1C5]Lessons from developing a web browser for raspberry pi
[1C5]Lessons from developing a web browser for raspberry pi
 
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
 
Internet Archive Video Presentation
Internet Archive Video Presentation Internet Archive Video Presentation
Internet Archive Video Presentation
 
HTML5 Audio & Video
HTML5 Audio & VideoHTML5 Audio & Video
HTML5 Audio & Video
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentation
 
WebRTC Live Q&A and Screen Capture session 3
WebRTC Live Q&A and Screen Capture session 3WebRTC Live Q&A and Screen Capture session 3
WebRTC Live Q&A and Screen Capture session 3
 

Dernier

Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 

Dernier (20)

Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 

Everything You Need to Know About HTML5 Video

  • 1.
  • 2.
  • 3.
  • 4. <audio <video src= src= The url to the audio or video width= The width of the video element height= The height of the video element poster= The url to the thumbnail of the video preload= preload= (none, metadata, auto) Start downloading autoplay autoplay Audio or video should play immediately loop loop Audio or video should return to start and play controls controls Will show controls (play, pause, scrub bar) > > … … </audio> </video>
  • 5.
  • 6.
  • 7.
  • 8. ! ! * * Chrome is removing support for H.264 * If WebM is installed ! Microsoft released a H.264 Extension for Chrome on Windows 7
  • 9. You Need More Than One
  • 10. You Need Both Big & Small
  • 11. Unlikely To Change Anytime Soon
  • 12. <video controls> <source src=hi-res.mp4 type=‘video/mp4; codecs="avc1.64001E, mp4a.40.2"’ media="(min-device-width: 800px)"> <source src=lo-res.mp4 type=‘video/mp4; codecs="avc1.42E01E, mp4a.40.2"’> <source src=hi-res.ogv type=‘video/ogg; codecs="theora, vorbis"’ media="(min-device-width: 800px)"> <source src=lo-res.ogv type=‘video/ogg; codecs="theora, vorbis"’> fall-back content only displayed by browsers that do not support the <video> element </video> Due to bug in iPhone/iPad iOS 3.x, mp4 should always be first
  • 14. Offload Encoding to the Cloud
  • 15. HTTP 1.1-compatible web server Seek Ahead Bit Rate Throttling
  • 16.
  • 17. Broadcast in HD Where Available by Jo Christian Oterhals
  • 18. Video Corruption – Dropped Frames
  • 19. Are there encoding settings that we can use to reduce corruption?
  • 20. Baseline * High Larger file Main Smaller File Less CPU to Decode More CPU to Decode Quick to Encode Longer to Encode baseline profile must be main profile compatible to support DirectX Video Acceleration
  • 21. Typical Group Of Pictures (GOP) structure
  • 24. Drawing with Canvas Hide the Video display a Canvas <div style="display:none"> <video id="sourcevid" autoplay preload="auto" width="1920" onloadedmetadata="init()"> </div> <canvas id="output" width="960" height="540"></canvas> function init() { video = document.getElementById('sourcevid'); var outputcanvas = document.getElementById('output'); draw = outputcanvas.getContext('2d'); setInterval("processFrame()", 33); // 30 fps } 30 times per second draw the cropped video onto canvas function processFrame() { // manipulate image here cropping and scaling as needed draw.drawImage(video, cX, cY, w, h, 0, 0, w, h); }
  • 25. video { position: relative; border-radius: 200px 50px 200px 50px; box-shadow: #244766 10px 10px 10px; transform: rotate(5deg) translate(15px,10px); }
  • 27.
  • 28. Custom Skinnable Players Media Element Methods play(), pause(), load(), canPlayType() Media Element Events video.addEventListener('play', function() { play.title = 'pause'; play.innerHTML = 'ǁ'; }, false);
  • 33. A Comparison of HTML5 Video Players Flash Name Licence JavaScript Library iOS Full screen Keyboard Subtitles easy to integrate easy to theme fallback Projekktor GPL 3 jQuery yes yes noish – – yes yes FlareVideo MIT jQuery yes – yes* play/ pause *** – yes yes Video JS GPL 3 – yes yes yes – yes yes yes JW Player custom – yes yes yes – – yes yes Kaltura / Adobe GPL 2 jQuery yes yes browser window – – yes yes html5media GPL 3 – yes yes yes* – – yes – jMediaelement MIT jQuery yes yes with plugin yes yes yes yes OIPlayer GPL 3 jQuery yes yes browser window – – noish yes HVideo custom jQuery – yes yes* play/ pause *** – noish yes jQuery Video ? jQuery – – – – – yes – Video for CC – yes yes yes* – – yes – Everybody Open Video custom jQuery yes yes browser window – – – maybe Player HTML5 Video ? MooTools – yes – – – yes yes Player mediaelement.js GPLv2 MIT jQuery yes yes yes – yes yes yes SublimeVideo ** paid service yes yes cmd/ctrl + click – – hell yes – Uppod.HTML5 ? – includable yes browser window pause *** – yes no LeanBack own – yes yes yes yes yes yes yes Mooplay GPL 3 MooTools no yes browser window – yes noish yes jPlayer MIT and GPL jQuery yes yes - – - yes yes OSM Player GPL 3 jQuery yes triple click to play browser window – – hell no – #videosws
  • 34. A Selection of HTML5 Video Players Sublime Video – Player as a Service mediaelement.js LeanBack Player – Keyboard Support JW Player