SlideShare a Scribd company logo
1 of 37
<video> will be your friend
       Joy Through “Standards”
Overview

• What is the video tag
• Why you can’t use it
• Why you’ll use it anyways
What is the Video Tag

• <video> makes video a first class citizen
• Part of the HTML5 specification
• As simple as <img>
Why You Can’t Use it


• Compatibility
• User Experience
Compatibility


• <video> standard does not mandate a format
• Just like the <img> tag
Two Primary Formats

       Theora

        H.264
Two Primary Formats

     Theora : ogg

      H.264 : mov/mp4/m4v
Taking sides
H.264                      OGG




        *
H.264

• Modern
• Scalable
• Efficient
But...


• Patented
• Royalty’d
Licensing


• MPEG-LA manages a patent pool
• Costs for Encoding, Decoding and
  potentially performance
Licensing


• MPEG-LA manages a patent pool
• Costs for Encoding, Decoding and
  potentially performance
What if you’re Firefox?

• Hard to pay a license cost
• Need cross platform support
• Values
What if you’re Firefox?

• Hard to pay a license cost
• Need cross platform support
                            Software Patents

• Values                      make me sad
OGG to the Rescue?

• On2 open sourced VP3, released patent
  claims
• Xiph.org group turns it into Theora
• Continues to enhance VP3
But...

• Technically inferior
• Submarine patents?
• Hardware support
What to do?

• Train is leaving the station
• IE9, Chrome, Safari, iEverything are on
  board with H.264
• Content producers are on board
• Fallback options exist
What to do?

• Train is leaving the station
• IE9, Chrome, Safari, iEverything are on
  board with H.264
• Content producers are on board
• Fallback options exist
Fallback example
<video>
  <source src=“video.mp4” type= “video/mp4” />
  <source src= “video.ogg” type= “video/ogg” />
  <object width="425" height="350"><param name="movie"
  value="myplayer.swf" />
  <param name= “flashvars” value= “file=video.mp4” />
  <embed src="myplayer.swf" flashvars= “file=video.mp4”
  type="application/x-shockwave-flash" width="425" height="350"> </
  embed>
    </object>
</video>
Fallback example
<video>
  <source src=“video.mp4” type= “video/mp4” />
  <source src= “video.ogg” type= “video/ogg” />
  <object width="425" height="350"><param name="movie"
  value="myplayer.swf" />
  <param name= “flashvars” value= “file=video.mp4” />
  <embed src="myplayer.swf" flashvars= “file=video.mp4”
  type="application/x-shockwave-flash" width="425" height="350"> </
  embed>
    </object>
</video>
Fallback example
<video>
  <source src=“video.mp4” type= “video/mp4” />
  <source src= “video.ogg” type= “video/ogg” />
  <object width="425" height="350"><param name="movie"
  value="myplayer.swf" />
  <param name= “flashvars” value= “file=video.mp4” />
  <embed src="myplayer.swf" flashvars= “file=video.mp4”
  type="application/x-shockwave-flash" width="425" height="350"> </
  embed>
    </object>
</video>
Fallback example
<video>
  <source src=“video.mp4” type= “video/mp4” />
  <source src= “video.ogg” type= “video/ogg” />
  <object width="425" height="350"><param name="movie"
  value="myplayer.swf" />
  <param name= “flashvars” value= “file=video.mp4” />
  <embed src="myplayer.swf" flashvars= “file=video.mp4”
  type="application/x-shockwave-flash" width="425" height="350"> </
  embed>
    </object>
</video>
Fallback example
<video>
  <source src=“video.mp4” type= “video/mp4” />
  <source src= “video.ogg” type= “video/ogg” />
  <object width="425" height="350"><param name="movie"
  value="myplayer.swf" />
  <param name= “flashvars” value= “file=video.mp4” />
  <embed src="myplayer.swf" flashvars= “file=video.mp4”
  type="application/x-shockwave-flash" width="425" height="350"> </
  embed>
    </object>
</video>
Why you want to use it

• Video can be a rich part of design
• Hardware acceleration
• Cross platform
Let’s build a player
Video Tag Attributes
  preload
               autoplay   controls
(autobuffer)


  height        loop      poster



    src         width
Video Tag Attributes
  preload
               autoplay   controls
(autobuffer)


  height        loop      poster



    src         width
Video Tag Attributes
  preload
               autoplay   controls
(autobuffer)


  height        loop      poster



    src         width
Video Tag Attributes
  preload
               autoplay   controls
(autobuffer)


  height        loop      poster



    src         width
Javascript Attributes
currentTime   startTime   duration


  paused       ended      seekable


 buffered      played     volume


  muted
Javascript Events

progress      play          pause



playing     canplay     canplaythrough



 ended     timeupdate
Living The Dream
Living The Dream
Caveats

• Some mobile platforms won’t run your JS
• Hardware accelerated platforms maybe
  limited to one video
• Make sure your server supports file resume
Summary

• <video> is coming
• It’s A Good Thing
• There are premade players today -
  jilion.com/sublime
• Great javascript helpers - html5video.org
@cmcfadden
http://z.umn.edu/lh

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Video Tag MinneWebCon presentation

  • 1. <video> will be your friend Joy Through “Standards”
  • 2. Overview • What is the video tag • Why you can’t use it • Why you’ll use it anyways
  • 3. What is the Video Tag • <video> makes video a first class citizen • Part of the HTML5 specification • As simple as <img>
  • 4. Why You Can’t Use it • Compatibility • User Experience
  • 5. Compatibility • <video> standard does not mandate a format • Just like the <img> tag
  • 6. Two Primary Formats Theora H.264
  • 7. Two Primary Formats Theora : ogg H.264 : mov/mp4/m4v
  • 8.
  • 12. Licensing • MPEG-LA manages a patent pool • Costs for Encoding, Decoding and potentially performance
  • 13. Licensing • MPEG-LA manages a patent pool • Costs for Encoding, Decoding and potentially performance
  • 14. What if you’re Firefox? • Hard to pay a license cost • Need cross platform support • Values
  • 15. What if you’re Firefox? • Hard to pay a license cost • Need cross platform support Software Patents • Values make me sad
  • 16. OGG to the Rescue? • On2 open sourced VP3, released patent claims • Xiph.org group turns it into Theora • Continues to enhance VP3
  • 17. But... • Technically inferior • Submarine patents? • Hardware support
  • 18. What to do? • Train is leaving the station • IE9, Chrome, Safari, iEverything are on board with H.264 • Content producers are on board • Fallback options exist
  • 19. What to do? • Train is leaving the station • IE9, Chrome, Safari, iEverything are on board with H.264 • Content producers are on board • Fallback options exist
  • 20. Fallback example <video> <source src=“video.mp4” type= “video/mp4” /> <source src= “video.ogg” type= “video/ogg” /> <object width="425" height="350"><param name="movie" value="myplayer.swf" /> <param name= “flashvars” value= “file=video.mp4” /> <embed src="myplayer.swf" flashvars= “file=video.mp4” type="application/x-shockwave-flash" width="425" height="350"> </ embed> </object> </video>
  • 21. Fallback example <video> <source src=“video.mp4” type= “video/mp4” /> <source src= “video.ogg” type= “video/ogg” /> <object width="425" height="350"><param name="movie" value="myplayer.swf" /> <param name= “flashvars” value= “file=video.mp4” /> <embed src="myplayer.swf" flashvars= “file=video.mp4” type="application/x-shockwave-flash" width="425" height="350"> </ embed> </object> </video>
  • 22. Fallback example <video> <source src=“video.mp4” type= “video/mp4” /> <source src= “video.ogg” type= “video/ogg” /> <object width="425" height="350"><param name="movie" value="myplayer.swf" /> <param name= “flashvars” value= “file=video.mp4” /> <embed src="myplayer.swf" flashvars= “file=video.mp4” type="application/x-shockwave-flash" width="425" height="350"> </ embed> </object> </video>
  • 23. Fallback example <video> <source src=“video.mp4” type= “video/mp4” /> <source src= “video.ogg” type= “video/ogg” /> <object width="425" height="350"><param name="movie" value="myplayer.swf" /> <param name= “flashvars” value= “file=video.mp4” /> <embed src="myplayer.swf" flashvars= “file=video.mp4” type="application/x-shockwave-flash" width="425" height="350"> </ embed> </object> </video>
  • 24. Fallback example <video> <source src=“video.mp4” type= “video/mp4” /> <source src= “video.ogg” type= “video/ogg” /> <object width="425" height="350"><param name="movie" value="myplayer.swf" /> <param name= “flashvars” value= “file=video.mp4” /> <embed src="myplayer.swf" flashvars= “file=video.mp4” type="application/x-shockwave-flash" width="425" height="350"> </ embed> </object> </video>
  • 25. Why you want to use it • Video can be a rich part of design • Hardware acceleration • Cross platform
  • 26. Let’s build a player
  • 27. Video Tag Attributes preload autoplay controls (autobuffer) height loop poster src width
  • 28. Video Tag Attributes preload autoplay controls (autobuffer) height loop poster src width
  • 29. Video Tag Attributes preload autoplay controls (autobuffer) height loop poster src width
  • 30. Video Tag Attributes preload autoplay controls (autobuffer) height loop poster src width
  • 31. Javascript Attributes currentTime startTime duration paused ended seekable buffered played volume muted
  • 32. Javascript Events progress play pause playing canplay canplaythrough ended timeupdate
  • 35. Caveats • Some mobile platforms won’t run your JS • Hardware accelerated platforms maybe limited to one video • Make sure your server supports file resume
  • 36. Summary • <video> is coming • It’s A Good Thing • There are premade players today - jilion.com/sublime • Great javascript helpers - html5video.org

Editor's Notes