SlideShare a Scribd company logo
jQueryUI and HTML5
  Video Play Nice
          October 16, 2010
   jQuery Conference Boston 2010


           Brian Crescimanno
      Principal Software Engineer, Brightcove
Hooray 1.4.3 & Mobile!
    Congrats to the jQuery Team!
Overview
• Watch me use a PLAIN Keynote theme
• HTML5 Video in General
• What do we mean “devices?”
• Mobile Device “Issues”
• Coding time!
• Next steps (for you!)
Keynote is fine...
...and so are my super plain slides!
Let’s talk <video>

• Part of the HTML5 standard
• Maybe the most exciting part of the actual
  HTML5 standard
• Reduce Flash dependence
• Deliver video to “devices”
So...how we doing?

• HTML5 video is being adopted pretty
  quickly...mostly.
• All major browsers except IE
• IE9 adds support
• But...
Enter the Codec Wars!

• Safari: H.264
• Chrome: H.264, WebM, Theora
• Firefox: Theora (WebM in FF4)
• Opera: WebM, Theora
• IE9: H.264, WebM (mostly)
Codec Hell Sucks!

• That’s only the beginning!
• Add mobile device support
• H.264 isn’t H.264
• WebM needs hardware support
• Lions and tigers and bears...OH MY!
Let’s not get worked up
 (We can talk codecs after the session if you want)
Some Good News!


• The spec is pretty damn good (mostly)!
•   Not so good: it isn’t usually fully implemented
This?                   This too?

    So what’s a “device?”


Hrmm...        Hopefully not this...
Smart Phones!

      • Sure!
      • Web browsers (Webkit, mostly)
      • Hardware H.264 decoding
      • Android, iOS (including iPad)

Did you notice on the last slide that the pieced together phone had a vibrator on it? Ewww!
But What Else?
Other “devices”
• Connected TVs
• GoogleTV
• Boxee Box, Roku Box, etc.
• HTPC, PS3, Xbox 360, Wii
• Not-so-smart phones
• Netbooks, Other tablets
Interface Challenges
The difficulty with all these devices is that they have
       completely different input metaphors.


       Touch, Controller, Keyboard & Mouse,
               Remote Control, etc.
So let’s talk Mobile
 Narrow our scope today to touch; so we’re not here
for 12 hours talking about every device under the sun
There are “Issues”

• Not all implementations are complete
• Not all implementations are equal
• No implementations are bug-free
An Example

• HTMLVideoElement#canPlayType
• Android doesn’t know how cool it is!
• So we end up falling back to checking for
  android specifically. Kinda lame.
And the method itself?
• Returns
 • “probably”
 • “maybe”
 • “”
• But what is it based on?
• iPhone 3g vs. iPhone 4 vs. iPad vs.
• ...you get the point!
Well ok, that’s one...

• Well here’s another!
• load() must be explicitly called on iOS and
  Android
• Otherwise the video won’t play
• Despite the spec saying that’s not needed
What happens when we
 have multiple videos?
     Well, that’s interesting...
Multiple videos?

• When might we have multiple videos?
 • Playlists
 • Ads (as much as we hate them)
• Let’s use multiple video elements!
 • It seems so simple...
Nope!
You see...

• Each video element object requires a user
  interaction to begin playback
• So we can’t auto-advance our playlist
• And we can’t play an ad and then start the
  video
So...uh...

• No big deal; let’s just change the src
  attribute of the <video> tag!
• Now let’s call load() again
 • ...as we have no choice...
What Happen?

• iOS requires a delay
 • Yes, I’m serious
• Android loads an entirely new player
 • Have fun with the back button!
Missing Events
• HTML5 spec defines a ton of events
• “progress” is a great one
 • Dispatched when the user agent is
    fetching media data
 • But not on iOS
 • We’ll get around this in the demo!
The Laundry List

•   Desktop Webkit ignores preload attribute

•   Desktop Webkit doesn’t support poster attribute

•   iOS overlay play button is tied to native controls

•   iOS full screen gesture tied to native controls
More Laundry

•   No autoplay on devices

•   Can’t create video elements dynamically on iOS

•   Android emulator sucks!

    •   It doesn’t play video

•   No software volume controls.
And sometimes...
The spec gets something wrong! (Or at least “wonky”)
“No Full Screen”

• Good news:
• Some vendors are doing it anyway
• We’ll see this in the code too...
• Better News:
• The HTML5 spec will likely have to include
  this feature before the final version.
Good news, everybody!
  We know about these issues, so we can do
      our best to work around them!
So let’s build
 something!
 And let’s use jQueryUI
Make it better
• Code (will be) on GitHub
• Ideas:
 • Companion playlist widget
 • Fix “poster” for the desktop
 • Add flash fallback
 • Custom paused overlay
 • Social sharing links

More Related Content

Similar to jQueryUI and HTML5 Video Play Nice

Mobile web application
Mobile web applicationMobile web application
Mobile web application偉格 高
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for EngineersBrian LeRoux
 
Mobile & Wearables Games for Health 2014 Tutorial
Mobile & Wearables Games for Health 2014 TutorialMobile & Wearables Games for Health 2014 Tutorial
Mobile & Wearables Games for Health 2014 TutorialGames for Health Project
 
The new Apple TV and the tvOS
The new Apple TV and the tvOSThe new Apple TV and the tvOS
The new Apple TV and the tvOSMugunth Kumar
 
Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Fahim Farook
 
Eyes Wide Open - Amir Ebrahimi
Eyes Wide Open - Amir EbrahimiEyes Wide Open - Amir Ebrahimi
Eyes Wide Open - Amir EbrahimiWithTheBest
 
Luka Birsa: Building A Buttonless Web Kit Thinclient Device Thingyyy
Luka Birsa: Building A Buttonless Web Kit Thinclient Device ThingyyyLuka Birsa: Building A Buttonless Web Kit Thinclient Device Thingyyy
Luka Birsa: Building A Buttonless Web Kit Thinclient Device ThingyyySlo-Tech
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011Brian LeRoux
 
BBC News: Responsive Web Design and Mustard
BBC News: Responsive Web Design and MustardBBC News: Responsive Web Design and Mustard
BBC News: Responsive Web Design and MustardKaelig Deloumeau-Prigent
 
Patrick Curry Meet Up
Patrick Curry Meet UpPatrick Curry Meet Up
Patrick Curry Meet UpTsugi
 
Screw HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIRScrew HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIREric Fickes
 
Deploy All The Games
Deploy All The GamesDeploy All The Games
Deploy All The GamesAdam Hill
 
Bot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent EllerbachBot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent EllerbachITCamp
 
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...ITCamp
 
Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkGorm Lai
 
iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKitMartin Grider
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?Reto Meier
 
Real world software launch
Real world software launchReal world software launch
Real world software launchKunal Johar
 

Similar to jQueryUI and HTML5 Video Play Nice (20)

Mobile web application
Mobile web applicationMobile web application
Mobile web application
 
Phonegap for Engineers
Phonegap for EngineersPhonegap for Engineers
Phonegap for Engineers
 
Mobile & Wearables Games for Health 2014 Tutorial
Mobile & Wearables Games for Health 2014 TutorialMobile & Wearables Games for Health 2014 Tutorial
Mobile & Wearables Games for Health 2014 Tutorial
 
The new Apple TV and the tvOS
The new Apple TV and the tvOSThe new Apple TV and the tvOS
The new Apple TV and the tvOS
 
Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015Debugging Tips and Tricks - iOS Conf Singapore 2015
Debugging Tips and Tricks - iOS Conf Singapore 2015
 
Eyes Wide Open - Amir Ebrahimi
Eyes Wide Open - Amir EbrahimiEyes Wide Open - Amir Ebrahimi
Eyes Wide Open - Amir Ebrahimi
 
Luka Birsa: Building A Buttonless Web Kit Thinclient Device Thingyyy
Luka Birsa: Building A Buttonless Web Kit Thinclient Device ThingyyyLuka Birsa: Building A Buttonless Web Kit Thinclient Device Thingyyy
Luka Birsa: Building A Buttonless Web Kit Thinclient Device Thingyyy
 
DjangoSki
DjangoSkiDjangoSki
DjangoSki
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011
 
BBC News: Responsive Web Design and Mustard
BBC News: Responsive Web Design and MustardBBC News: Responsive Web Design and Mustard
BBC News: Responsive Web Design and Mustard
 
Patrick Curry Meet Up
Patrick Curry Meet UpPatrick Curry Meet Up
Patrick Curry Meet Up
 
Screw HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIRScrew HTML5, make cool shit with AIR
Screw HTML5, make cool shit with AIR
 
Deploy All The Games
Deploy All The GamesDeploy All The Games
Deploy All The Games
 
Bot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent EllerbachBot. You said bot? Let build bot then! - Laurent Ellerbach
Bot. You said bot? Let build bot then! - Laurent Ellerbach
 
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
ITCamp 2017 - Laurent Ellerbach - Bot. You said bot? Let's build a bot then...
 
Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You Think
 
iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKit
 
Ios - Intorduction to view controller
Ios - Intorduction to view controllerIos - Intorduction to view controller
Ios - Intorduction to view controller
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?
 
Real world software launch
Real world software launchReal world software launch
Real world software launch
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKUXDXConf
 
Motion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in TechnologyMotion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in TechnologyUXDXConf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 

Recently uploaded (20)

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Motion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in TechnologyMotion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in Technology
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 

jQueryUI and HTML5 Video Play Nice

  • 1. jQueryUI and HTML5 Video Play Nice October 16, 2010 jQuery Conference Boston 2010 Brian Crescimanno Principal Software Engineer, Brightcove
  • 2. Hooray 1.4.3 & Mobile! Congrats to the jQuery Team!
  • 3. Overview • Watch me use a PLAIN Keynote theme • HTML5 Video in General • What do we mean “devices?” • Mobile Device “Issues” • Coding time! • Next steps (for you!)
  • 4. Keynote is fine... ...and so are my super plain slides!
  • 5. Let’s talk <video> • Part of the HTML5 standard • Maybe the most exciting part of the actual HTML5 standard • Reduce Flash dependence • Deliver video to “devices”
  • 6. So...how we doing? • HTML5 video is being adopted pretty quickly...mostly. • All major browsers except IE • IE9 adds support • But...
  • 7. Enter the Codec Wars! • Safari: H.264 • Chrome: H.264, WebM, Theora • Firefox: Theora (WebM in FF4) • Opera: WebM, Theora • IE9: H.264, WebM (mostly)
  • 8. Codec Hell Sucks! • That’s only the beginning! • Add mobile device support • H.264 isn’t H.264 • WebM needs hardware support • Lions and tigers and bears...OH MY!
  • 9. Let’s not get worked up (We can talk codecs after the session if you want)
  • 10. Some Good News! • The spec is pretty damn good (mostly)! • Not so good: it isn’t usually fully implemented
  • 11. This? This too? So what’s a “device?” Hrmm... Hopefully not this...
  • 12. Smart Phones! • Sure! • Web browsers (Webkit, mostly) • Hardware H.264 decoding • Android, iOS (including iPad) Did you notice on the last slide that the pieced together phone had a vibrator on it? Ewww!
  • 14. Other “devices” • Connected TVs • GoogleTV • Boxee Box, Roku Box, etc. • HTPC, PS3, Xbox 360, Wii • Not-so-smart phones • Netbooks, Other tablets
  • 15. Interface Challenges The difficulty with all these devices is that they have completely different input metaphors. Touch, Controller, Keyboard & Mouse, Remote Control, etc.
  • 16. So let’s talk Mobile Narrow our scope today to touch; so we’re not here for 12 hours talking about every device under the sun
  • 17. There are “Issues” • Not all implementations are complete • Not all implementations are equal • No implementations are bug-free
  • 18. An Example • HTMLVideoElement#canPlayType • Android doesn’t know how cool it is! • So we end up falling back to checking for android specifically. Kinda lame.
  • 19. And the method itself? • Returns • “probably” • “maybe” • “” • But what is it based on? • iPhone 3g vs. iPhone 4 vs. iPad vs. • ...you get the point!
  • 20. Well ok, that’s one... • Well here’s another! • load() must be explicitly called on iOS and Android • Otherwise the video won’t play • Despite the spec saying that’s not needed
  • 21. What happens when we have multiple videos? Well, that’s interesting...
  • 22. Multiple videos? • When might we have multiple videos? • Playlists • Ads (as much as we hate them) • Let’s use multiple video elements! • It seems so simple...
  • 23. Nope!
  • 24. You see... • Each video element object requires a user interaction to begin playback • So we can’t auto-advance our playlist • And we can’t play an ad and then start the video
  • 25. So...uh... • No big deal; let’s just change the src attribute of the <video> tag! • Now let’s call load() again • ...as we have no choice...
  • 26. What Happen? • iOS requires a delay • Yes, I’m serious • Android loads an entirely new player • Have fun with the back button!
  • 27. Missing Events • HTML5 spec defines a ton of events • “progress” is a great one • Dispatched when the user agent is fetching media data • But not on iOS • We’ll get around this in the demo!
  • 28. The Laundry List • Desktop Webkit ignores preload attribute • Desktop Webkit doesn’t support poster attribute • iOS overlay play button is tied to native controls • iOS full screen gesture tied to native controls
  • 29. More Laundry • No autoplay on devices • Can’t create video elements dynamically on iOS • Android emulator sucks! • It doesn’t play video • No software volume controls.
  • 30. And sometimes... The spec gets something wrong! (Or at least “wonky”)
  • 31. “No Full Screen” • Good news: • Some vendors are doing it anyway • We’ll see this in the code too... • Better News: • The HTML5 spec will likely have to include this feature before the final version.
  • 32. Good news, everybody! We know about these issues, so we can do our best to work around them!
  • 33. So let’s build something! And let’s use jQueryUI
  • 34.
  • 35.
  • 36.
  • 37. Make it better • Code (will be) on GitHub • Ideas: • Companion playlist widget • Fix “poster” for the desktop • Add flash fallback • Custom paused overlay • Social sharing links

Editor's Notes