SlideShare une entreprise Scribd logo
1  sur  94
Télécharger pour lire hors ligne
Mobile Meow
      Bring YouTube to the Mobile Web




By YouTube's Greg Schechter and Eugene Goldin
Greg Schechter           Eugene Goldin
The Web Warrior          Code Crusader




schechter@google.com   eugenegoldin@google.com
Video
Video
A Brief History
Video
Flash
<video>
Video
Playback Stats
Flash   Native   <video>
Flash
Flash
         ==   Flash
Flash   Flash
Native
Native


 ○   For fallbacks, use rtsp:// protocol (serving .3pg) if the
     device won't support HTML5
 ○   Use custom protocol / URL scheme to launch your own
     Android, iOS native app (no Windows Phone yet)
      ■ youtube://video_id
<video>
The Different Browsers




        Safari           Android
The Different Browsers

                             Opera
Safari    Android   Chrome                Silk
                              Mini




    Firefox   Opera
                                     IE
The Different Browsers

                             Opera
Safari    Android   Chrome                Silk
                              Mini




    Firefox   Opera
                                     IE




                    AMP LE
              S
By brownpau at http://www.flickr.com/photos/brownpau/533267369/
How do we start




              <video>
The Source




     <video src="funny_cat_video">
The Source




<video src="funny_cat_video.webm/mp4/ogg">
Mobile Formats Support


        Chrome       Safari           Firefox   Opera        IE   Android
H.264



WebM    Android 4+                              Android 4+        Android 4+



HLS                                                               Android 3+




 Platform Versions and Distribution
The Source




   <video>
    <source src="funny_cat_video.mp4">
    <source src="funny_cat_video.webm">
   </video>
Power
Power Consumption: H264 vs WebM


                                                                              **fullscreen flash
                                                                              **windowed flash




Research done by Yossi Oren For more information visit http://iss.oy.ne.ro/
Stick it in a page
Basic video tag
Safari
   ○   Renders a thumbnail poster and play button (flaky)
   ○   Background is set to black and cannot be overwritten
   ○   If a parent element has display:none set at any point the video fails to
       playback properly

Opera
   ○   Gives video dimentions black background if the information is
       available
   ○   Has issues with stretching WebM

IE and Android
   ○   Play button/film icon for all video tags regardless if browser can play
       the format
   ○   Background is set to black/grey and cannot be overwritten
Give it a poster and click it
Poster Attribute
Use the poster attribute to get a thumbnail

Safari, Chrome, Android, and Opera
   ○ Preserve aspect ratio of poster image
IE and Firefox
    ○ Stretch image to size of video tag
IE
     ○   Keeps poster as paused state

All Others
    ○ Replace video with the paused frame
Basic video tag


Chrome
   ○ Default click to toggle play/pause
   ○ Remove with an empty onclick handler
Safari
   ○     Will launch any supported video with or without an onclick handler

Android and IE
   ○ Shows click interactions but does not play with empty onclick
Basic video tag



Pro tips:
   ○   Create your own cued state to convey you can play the video
   ○   Set the background color to black for continuity across platforms
Controls




           <video controls>
Controls
             Chrome   Safari       Firefox       Opera           IE           Android
Play/pause
Button


Volume                Only in      Mute toggle   Don't work in
Controls              Fullscreen   only          Android 4


Seek bar



Fullscreen   Button   Gesture                                                 Button
button

Playback     Both     Fullscreen   Inline only   Determined      Fullscreen   Both
Type                  only                       by hardware     only
Custom Controls
● Preserve your brand
● Unified experience across platforms and
  browsers
Custom Controls




  Lets get some custom controls
Custom Controls
● Allows us to expand the set of controls and add our own
  ○ annotations
  ○ playlist
  ○ captions
  ○ more
Custom Controls Pro Tips
● User expect to be able to drag the progress
  bar
  ○ Need to remender to prevent scroll on touchstart
● Volume can't be set everywhere and users
  are accustomed to using device controls
  ○ So don't build controls for it
Custom Controls Pro Tips
●   Fingers are fat
    ○ Average finger is 11mm so make targets at least
        40px with 10px padding
    ○   Use SVG's so icons can be scaled and shared with
        desktop application
    ○   Do what you can in css
Custom Controls Pro Tips
●   Don't trigger content with hover
●   Fullscreen
    ○ The browsing context is always fullscreen so fake it
Fullscreen
requestFullScreen
requestFullScreen
● Desktop Only
  ○ Firefox, Safari, and Chrome
  ○ Vendor Prefixed
What about Mobile?
Isn't it already fullscreen?
Yes (sort of)
Mobile Fullscreen

●   Open New Tab
●   webkitEnterFullscreen
      ■ Webkit only
      ■ Video element only
      ■ metadata must be loaded
Mobile Fullscreen

●   Open New Tab
●   webkitEnterFullscreen
      ■ Webkit only
      ■ Video element only
      ■ metadata must be loaded
●   Pro Tip: Remember size context
    changes so use viewport to scale
    icons and controls
@viewport { width: device-width; }
autoplay




           <video autoplay>
autoplay


In Safari on iOS (for all devices, including iPad),
where the user may be on a cellular network and
be charged per data unit, preload and autoplay are
disabled. No data is loaded until the user initiates it.
What about everyone else?
Autoplay


            Chrome   Safari   Firefox   Opera   IE   Android
Attribute



Scripted                                             Buggy
autoplay
autoplay




       <video onclick="this.play()">
autoplay
function someClickEvent(evt) {
  // In a user initiated thread.
  myVideoElement.load();
  getVideoData(); // Triggers an ajax call.
}

function onGetVideoDataReturned(data) {
  // Not in a user initiated thread.
  setVideoElementSrc(data);
  myVideoElement.load();
  myVideoElement.play();
}
autoplay
function someClickEvent(evt) {
  // In a user initiated thread.
  myVideoElement.load();
  getVideoData(); // Triggers an ajax call.
}

function onGetVideoDataReturned(data) {
  // Not in a user initiated thread.
  setVideoElementSrc(data);
  myVideoElement.load();
  // For Android
  window.setTimeout(function() {
    myVideoElement.play();
  }, 0);
}
Embeds
Embeds
 <script>
Embeds
 <script>
   ○ We need our content to be sandboxed
   ○ More than just a video tag
Embeds
 <script>
   ○ We need our content to be sandboxed
   ○ More than just a video tag
 <object>
Embeds
 <script>
   ○ We need our content to be sandboxed
   ○ More than just a video tag
 <object>
   ○ Can load content with the data
      attribute
   ○ But no way to interact with it via
      JavaScript
Embeds
 <iframe>
Embeds
 <iframe>
    ○ Allows our content to be sandboxed
    ○ JavaScript API communication
Embeds

<iframe type="text/html"
  width="640"
  height="385"
  frameborder="0"
  src="http://www.youtube.com/embed/VIDEO_ID"
  allowfullscreen>
</iframe>
Embeds
Pro tip: Plan for the future (if you can)

<iframe type="text/html"
  width="640"
  height="385"
  frameborder="0"
  src="http://www.youtube.com/embed/VIDEO_ID"
  allowfullscreen>
</iframe>
Embeds Pro Tips:



html {
  /** Hack to fix iPhone resizing. */
  overflow: hidden;
}
Embeds Pro Tips:

body {
  /** Dymanic Resizing **/
  background-color: #000;
  height: 100%;
  width: 100%;
  /** Remove highlight when use clicks **/
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
Testing
Testing: The Old Fashioned Way
 ●   Device lab
      ○ accurate
      ○ costly
      ○ space inefficient
      ○ boring
Testing: With Software
 ● Hardware Emulators / Simulators
    ○ available for major systems
    ○ approximation varies
    ○ still boring
 ● Android Emulator
    ○ bulky, slow, no video codecs
 ● iOs Simulator
    ○ both tablet and phone
Testing: With Software
 ● Browser Simulators
   ○ Poorer approximation
 ● Opera Mobile Simulator
   ○ missing video tag support
 ● Fennec (FF) Simulator
   ○ poor touch control mapping
   ○ sends desktop user agent
Testing: Automation
 ● Selenium!
   ○ use with simulated or real devices
   ○ not boring
Testing: Automation
 ● Android Webdriver
    ○ Still no video support
 ● iOS Webdriver
    ○ Need to register as ios dev
    ○ Intermittent issues with playback
 ● IE
    ○ No webdriver APIs for mobile
Testing: Automation
 ● Chrome, Opera
   ○ Driver APIs built-in
   ○ Remote debugging
 ● FFMobile
   ○ No webdriver APIs
Testing: Automation Strategy
 ● Test API methods in mobile context first
   ○ cheap
   ○ can approximate video playback by video.
      currentTime
Testing: Automation Strategy
 ● More sophisticated tests to follow
   ○ screenreader
 ● Screen cap processing
   ○ check for distortion
   ○ playback accuracy
Testing: Automation Strategy
 ● Screen cap processing
Testing: Hardware Assistance




   for more information check out http://bitbeam.org/
The Future




 Cats in Space by WF&TD
Or
PointerEvents
http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx
http://imgs.xkcd.com/comics/in_ur_reality.png
Track



<video>
 <track src="cats_meow" kind="subtitles">
</video>
Camera Access with
  getUserMedia
More to learn
 ● HTML5 Video Spec
   ○ http://dev.w3.org/html5/spec-author-view/video.html
 ● Browser Blogs
   ○ http://dev.opera.com/
   ○ http://hacks.mozilla.org/
   ○ http://blogs.msdn.com/b/ie/
   ○ http://peter.sh/
 ● Documentation
   ○ https://developer.mozilla.org/en-US/
 ● Other
   ○ http://developer.apple.
        com/library/safari/#documentation/AudioVideo/Conceptual/Using_HT
        ML5_Audio_Video/Device-SpecificConsiderations/Device-
        SpecificConsiderations.html
Questions?




     can haz question?
            By cloudzilla http://www.flickr.com/photos/cloudzilla/378829651/
schechter@google.com
eugenegoldin@google.com

Contenu connexe

Tendances

Play with html games
Play with html gamesPlay with html games
Play with html gamesHuan Du
 
Multimedia Project Choices
Multimedia Project ChoicesMultimedia Project Choices
Multimedia Project ChoicesKatie Morrow
 
Get Seen: Web Video Word Camp Boston
Get Seen: Web Video Word Camp BostonGet Seen: Web Video Word Camp Boston
Get Seen: Web Video Word Camp BostonSteve Garfield
 
Building Video Applications with YouTube APIs
Building Video Applications with YouTube APIsBuilding Video Applications with YouTube APIs
Building Video Applications with YouTube APIsJarek Wilkiewicz
 
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...Jarek Wilkiewicz
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchAlexander Wilhelm
 
Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Michele Butcher-Jones
 
Evaluation question 4
Evaluation question 4Evaluation question 4
Evaluation question 4tempzstah
 
Wordpress customisation for travel blogs
Wordpress customisation for travel blogs Wordpress customisation for travel blogs
Wordpress customisation for travel blogs GetawayMagazine
 
C_purvis_assign_3
C_purvis_assign_3C_purvis_assign_3
C_purvis_assign_3Sissitech
 

Tendances (16)

HTML+CSS Resources
HTML+CSS ResourcesHTML+CSS Resources
HTML+CSS Resources
 
Play with html games
Play with html gamesPlay with html games
Play with html games
 
Multimedia Project Choices
Multimedia Project ChoicesMultimedia Project Choices
Multimedia Project Choices
 
Get Seen: Web Video Word Camp Boston
Get Seen: Web Video Word Camp BostonGet Seen: Web Video Word Camp Boston
Get Seen: Web Video Word Camp Boston
 
YouTube for Developers
YouTube for DevelopersYouTube for Developers
YouTube for Developers
 
Building Video Applications with YouTube APIs
Building Video Applications with YouTube APIsBuilding Video Applications with YouTube APIs
Building Video Applications with YouTube APIs
 
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...
 
MoMo Oct Event
MoMo Oct EventMoMo Oct Event
MoMo Oct Event
 
YouTube APIs Workshop
YouTube APIs WorkshopYouTube APIs Workshop
YouTube APIs Workshop
 
Videogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha TouchVideogram - Building a product with Sencha Touch
Videogram - Building a product with Sencha Touch
 
Website Research
Website ResearchWebsite Research
Website Research
 
Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014Introduction to Jetpack- WordCamp Chicago 2014
Introduction to Jetpack- WordCamp Chicago 2014
 
Evaluation question 4
Evaluation question 4Evaluation question 4
Evaluation question 4
 
Appa
AppaAppa
Appa
 
Wordpress customisation for travel blogs
Wordpress customisation for travel blogs Wordpress customisation for travel blogs
Wordpress customisation for travel blogs
 
C_purvis_assign_3
C_purvis_assign_3C_purvis_assign_3
C_purvis_assign_3
 

Similaire à Mobile Meow at Mobilism

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 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingbrucelawson
 
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 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingHTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingbrucelawson
 
Warsawclouddays video
Warsawclouddays videoWarsawclouddays video
Warsawclouddays videoDoug Sillars
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidXavier Hallade
 
Html5 browser api_support
Html5 browser api_supportHtml5 browser api_support
Html5 browser api_support상길 안
 
Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video TutorialSilvia Pfeiffer
 
3 2-1-Action! Screencasting Tools
3 2-1-Action! Screencasting Tools3 2-1-Action! Screencasting Tools
3 2-1-Action! Screencasting ToolsDiana Benner
 
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...Shlomo Perets
 
Video Killed My Data Plan: Helsinki
Video Killed My Data Plan: HelsinkiVideo Killed My Data Plan: Helsinki
Video Killed My Data Plan: HelsinkiDoug Sillars
 

Similaire à Mobile Meow at Mobilism (20)

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 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
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 audio
 
Html5video
Html5videoHtml5video
Html5video
 
HTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're goingHTML5 Multimedia: where we are, where we're going
HTML5 Multimedia: where we are, where we're going
 
Warsawclouddays video
Warsawclouddays videoWarsawclouddays video
Warsawclouddays video
 
Video js zagreb
Video js zagrebVideo js zagreb
Video js zagreb
 
Portogdg video
Portogdg videoPortogdg video
Portogdg video
 
Gdg lublin video
Gdg lublin videoGdg lublin video
Gdg lublin video
 
Rija js video
Rija js videoRija js video
Rija js video
 
Krakow video
Krakow videoKrakow video
Krakow video
 
Vilnius py video
Vilnius py videoVilnius py video
Vilnius py video
 
Corkgdg video
Corkgdg videoCorkgdg video
Corkgdg video
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
Armadajs video
Armadajs videoArmadajs video
Armadajs video
 
Html5 browser api_support
Html5 browser api_supportHtml5 browser api_support
Html5 browser api_support
 
Html5 Open Video Tutorial
Html5 Open Video TutorialHtml5 Open Video Tutorial
Html5 Open Video Tutorial
 
3 2-1-Action! Screencasting Tools
3 2-1-Action! Screencasting Tools3 2-1-Action! Screencasting Tools
3 2-1-Action! Screencasting Tools
 
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...
Integrating web-based videos in your PDFs (with FrameMaker-to Acrobat TimeSav...
 
Video Killed My Data Plan: Helsinki
Video Killed My Data Plan: HelsinkiVideo Killed My Data Plan: Helsinki
Video Killed My Data Plan: Helsinki
 

Dernier

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfAnubhavMangla3
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 

Dernier (20)

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 

Mobile Meow at Mobilism

  • 1. Mobile Meow Bring YouTube to the Mobile Web By YouTube's Greg Schechter and Eugene Goldin
  • 2. Greg Schechter Eugene Goldin The Web Warrior Code Crusader schechter@google.com eugenegoldin@google.com
  • 5.
  • 6.
  • 11. Video
  • 13. Flash Native <video>
  • 14. Flash Flash == Flash
  • 15. Flash Flash
  • 17. Native ○ For fallbacks, use rtsp:// protocol (serving .3pg) if the device won't support HTML5 ○ Use custom protocol / URL scheme to launch your own Android, iOS native app (no Windows Phone yet) ■ youtube://video_id
  • 19. The Different Browsers Safari Android
  • 20. The Different Browsers Opera Safari Android Chrome Silk Mini Firefox Opera IE
  • 21. The Different Browsers Opera Safari Android Chrome Silk Mini Firefox Opera IE AMP LE S
  • 22. By brownpau at http://www.flickr.com/photos/brownpau/533267369/
  • 23. How do we start <video>
  • 24. The Source <video src="funny_cat_video">
  • 26. Mobile Formats Support Chrome Safari Firefox Opera IE Android H.264 WebM Android 4+ Android 4+ Android 4+ HLS Android 3+ Platform Versions and Distribution
  • 27. The Source <video> <source src="funny_cat_video.mp4"> <source src="funny_cat_video.webm"> </video>
  • 28. Power
  • 29. Power Consumption: H264 vs WebM **fullscreen flash **windowed flash Research done by Yossi Oren For more information visit http://iss.oy.ne.ro/
  • 30. Stick it in a page
  • 31. Basic video tag Safari ○ Renders a thumbnail poster and play button (flaky) ○ Background is set to black and cannot be overwritten ○ If a parent element has display:none set at any point the video fails to playback properly Opera ○ Gives video dimentions black background if the information is available ○ Has issues with stretching WebM IE and Android ○ Play button/film icon for all video tags regardless if browser can play the format ○ Background is set to black/grey and cannot be overwritten
  • 32. Give it a poster and click it
  • 33. Poster Attribute Use the poster attribute to get a thumbnail Safari, Chrome, Android, and Opera ○ Preserve aspect ratio of poster image IE and Firefox ○ Stretch image to size of video tag IE ○ Keeps poster as paused state All Others ○ Replace video with the paused frame
  • 34. Basic video tag Chrome ○ Default click to toggle play/pause ○ Remove with an empty onclick handler Safari ○ Will launch any supported video with or without an onclick handler Android and IE ○ Shows click interactions but does not play with empty onclick
  • 35. Basic video tag Pro tips: ○ Create your own cued state to convey you can play the video ○ Set the background color to black for continuity across platforms
  • 36. Controls <video controls>
  • 37. Controls Chrome Safari Firefox Opera IE Android Play/pause Button Volume Only in Mute toggle Don't work in Controls Fullscreen only Android 4 Seek bar Fullscreen Button Gesture Button button Playback Both Fullscreen Inline only Determined Fullscreen Both Type only by hardware only
  • 38. Custom Controls ● Preserve your brand ● Unified experience across platforms and browsers
  • 39. Custom Controls Lets get some custom controls
  • 40. Custom Controls ● Allows us to expand the set of controls and add our own ○ annotations ○ playlist ○ captions ○ more
  • 41. Custom Controls Pro Tips ● User expect to be able to drag the progress bar ○ Need to remender to prevent scroll on touchstart ● Volume can't be set everywhere and users are accustomed to using device controls ○ So don't build controls for it
  • 42. Custom Controls Pro Tips ● Fingers are fat ○ Average finger is 11mm so make targets at least 40px with 10px padding ○ Use SVG's so icons can be scaled and shared with desktop application ○ Do what you can in css
  • 43. Custom Controls Pro Tips ● Don't trigger content with hover ● Fullscreen ○ The browsing context is always fullscreen so fake it
  • 46. requestFullScreen ● Desktop Only ○ Firefox, Safari, and Chrome ○ Vendor Prefixed
  • 48. Isn't it already fullscreen?
  • 50. Mobile Fullscreen ● Open New Tab ● webkitEnterFullscreen ■ Webkit only ■ Video element only ■ metadata must be loaded
  • 51. Mobile Fullscreen ● Open New Tab ● webkitEnterFullscreen ■ Webkit only ■ Video element only ■ metadata must be loaded ● Pro Tip: Remember size context changes so use viewport to scale icons and controls
  • 52. @viewport { width: device-width; }
  • 53. autoplay <video autoplay>
  • 54.
  • 55. autoplay In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it.
  • 57. Autoplay Chrome Safari Firefox Opera IE Android Attribute Scripted Buggy
  • 59. autoplay <video onclick="this.play()">
  • 60.
  • 61.
  • 62. autoplay function someClickEvent(evt) { // In a user initiated thread. myVideoElement.load(); getVideoData(); // Triggers an ajax call. } function onGetVideoDataReturned(data) { // Not in a user initiated thread. setVideoElementSrc(data); myVideoElement.load(); myVideoElement.play(); }
  • 63. autoplay function someClickEvent(evt) { // In a user initiated thread. myVideoElement.load(); getVideoData(); // Triggers an ajax call. } function onGetVideoDataReturned(data) { // Not in a user initiated thread. setVideoElementSrc(data); myVideoElement.load(); // For Android window.setTimeout(function() { myVideoElement.play(); }, 0); }
  • 66. Embeds <script> ○ We need our content to be sandboxed ○ More than just a video tag
  • 67. Embeds <script> ○ We need our content to be sandboxed ○ More than just a video tag <object>
  • 68. Embeds <script> ○ We need our content to be sandboxed ○ More than just a video tag <object> ○ Can load content with the data attribute ○ But no way to interact with it via JavaScript
  • 70. Embeds <iframe> ○ Allows our content to be sandboxed ○ JavaScript API communication
  • 71. Embeds <iframe type="text/html" width="640" height="385" frameborder="0" src="http://www.youtube.com/embed/VIDEO_ID" allowfullscreen> </iframe>
  • 72. Embeds Pro tip: Plan for the future (if you can) <iframe type="text/html" width="640" height="385" frameborder="0" src="http://www.youtube.com/embed/VIDEO_ID" allowfullscreen> </iframe>
  • 73. Embeds Pro Tips: html { /** Hack to fix iPhone resizing. */ overflow: hidden; }
  • 74. Embeds Pro Tips: body { /** Dymanic Resizing **/ background-color: #000; height: 100%; width: 100%; /** Remove highlight when use clicks **/ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
  • 76. Testing: The Old Fashioned Way ● Device lab ○ accurate ○ costly ○ space inefficient ○ boring
  • 77. Testing: With Software ● Hardware Emulators / Simulators ○ available for major systems ○ approximation varies ○ still boring ● Android Emulator ○ bulky, slow, no video codecs ● iOs Simulator ○ both tablet and phone
  • 78. Testing: With Software ● Browser Simulators ○ Poorer approximation ● Opera Mobile Simulator ○ missing video tag support ● Fennec (FF) Simulator ○ poor touch control mapping ○ sends desktop user agent
  • 79. Testing: Automation ● Selenium! ○ use with simulated or real devices ○ not boring
  • 80. Testing: Automation ● Android Webdriver ○ Still no video support ● iOS Webdriver ○ Need to register as ios dev ○ Intermittent issues with playback ● IE ○ No webdriver APIs for mobile
  • 81. Testing: Automation ● Chrome, Opera ○ Driver APIs built-in ○ Remote debugging ● FFMobile ○ No webdriver APIs
  • 82. Testing: Automation Strategy ● Test API methods in mobile context first ○ cheap ○ can approximate video playback by video. currentTime
  • 83. Testing: Automation Strategy ● More sophisticated tests to follow ○ screenreader ● Screen cap processing ○ check for distortion ○ playback accuracy
  • 84. Testing: Automation Strategy ● Screen cap processing
  • 85. Testing: Hardware Assistance for more information check out http://bitbeam.org/
  • 86. The Future Cats in Space by WF&TD
  • 87.
  • 88. Or
  • 91. Track <video> <track src="cats_meow" kind="subtitles"> </video>
  • 92. Camera Access with getUserMedia
  • 93. More to learn ● HTML5 Video Spec ○ http://dev.w3.org/html5/spec-author-view/video.html ● Browser Blogs ○ http://dev.opera.com/ ○ http://hacks.mozilla.org/ ○ http://blogs.msdn.com/b/ie/ ○ http://peter.sh/ ● Documentation ○ https://developer.mozilla.org/en-US/ ● Other ○ http://developer.apple. com/library/safari/#documentation/AudioVideo/Conceptual/Using_HT ML5_Audio_Video/Device-SpecificConsiderations/Device- SpecificConsiderations.html
  • 94. Questions? can haz question? By cloudzilla http://www.flickr.com/photos/cloudzilla/378829651/ schechter@google.com eugenegoldin@google.com