SlideShare une entreprise Scribd logo
1  sur  21
HTML5 Multimedia Canvas, Audio, Video and more..
Agenda Canvas Audio Video SVG WebGL
whoami /r Parashuram Work for a company that makes browsers Web Enthusiast – spends time writing code Worked on IndexedDB standards and demos http://nparashuram.com http://blog.nparashuram.com @nparashuram
Canvas
Pixel based drawing surface 2d context The drawing API Lines and Curves Fille and Gradients Image data, security context GPU accelerated, possible trace-JITed JS code Works well with Videos, WebWorkers Canvas
Canvas - Code <canvas id = “myCanvas” width = “100px” height =  “100px” style = “width:200px;height:200px”> Canvasnot supported </canvas> <script> varelem= document.getElementById('myCanvas'); </script>
Canvas - Code varcontext = elem.getContext('2d'); context.fillRect(0, 0, 150, 100); context.moveTo(10, 10);  context.lineTo(100, 10);  context.stroke(); context.closePath(); context.drawImage(img_elem, dx, dy, dw, dh);
Canvas - Code context.font = 'italic 30px sans-serif';  context.strokeText('Hello world!', 0, 50); context.fillText ('Hello world!', 0, 0); context.shadowColor = 'rgba(255, 0, 0, 0.5)'; context.shadowBlur = 4; context.shadowColor = 'rgba(255, 0, 0, 0.5)'; context.fillRect(20, 20, 150, 100); var g= context.createLinearGradient(sx, sy, dx, dy); context.fillStyle = g;
Canvas - Demos http://canvaspaint.org/ http://nparashuram.com/seamcarving/index.html http://www.canvasdemos.com/type/games/ http://www.benjoffe.com/code/demos/canvascape/ http://caniuse.com/#search=canvas
Video Native support to play video in browser Codecs (What data is stored) H.264 Theora VP8 Containers (How data is stored) MPEG4 Flash Ogg WebM Should be Served with correct MIME-TYPE Fallback mechanism
Video - Code <video  poster="star.png" autoplay loop preload controls > <sourcesrc="movie.webm"  	type='video/webm; codecs="vp8, vorbis"' /> 	<sourcesrc="movie.mp4"  	type='video/mp4;codecs="avc1.42E01E,mp4a.40.2"'/> Video tag not supported. Use Flash Tags here or Download <a href="movie.webm">here</a>. <video>
Video - Code video.play(); video.pause() video.playbackRate = 0.8; video.addTrack(kind, label, language)  onPlay, canplaythrough, progress, stalled, loadeddata, loadedmetadata, waiting,
Video - Demos http://html5demos.com/video http://html5demos.com/two-videos http://sublimevideo.net/demo http://caniuse.com/video
Audio Native support for sound Controls, API similar to Video Play audio files, control playback Audio Data API – work in progress
Audio - Code <audiocontrols preload="auto" autobuffer>  	<sourcesrc="elvis.mp3" /> 	<sourcesrc="elvis.ogg" />  <!-- now include flash fall back --> </audio>
Audio - Demos http://www.jplayer.org/latest/demo-01/# http://tinyurl.com/4v8yu42 http://apm.ircam.fr/page/audio-tag/
SVG XML Based Scalable Vector Graphics Embed inline in HTML Scalable Images  Elements scriptable on DOM SVG in CSS as background images SVG Filters for Video
SVG - Code <svgxmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width='300px' height='300px'> 	<title> Small SVG example </title> <circle cx='120' cy='150' r='60' style='fill: gold;'> 		<animateattributeName='r' from='2' to='80' 			begin='0' dur='3' repeatCount='indefinite' /> </circle> 	<polyline points='120 30, 25 150, 290 150'  	stroke-width='4’  	stroke='brown' style='fill: none;' /> <text x='60' y='250' fill='blue'> Hello, World! </text> </svg>
SVG - Demo http://svg-edit.googlecode.com/svn/branches/2.4/editor/svg-editor.html http://slides.html5rocks.com/#inline-svg http://caniuse.com/svg-html5
WebGL 3D Graphics API Based on OpenGL ES 2.0 On Canvas element Learning WebGL Demos http://www.ambiera.com/coppercube/webgldemos.html http://www.khronos.org/webgl/wiki/Demo_Repository
Demos http://www.craftymind.com/factory/html5video/CanvasVideo.html https://developer.mozilla.org/samples/video/chroma-key/index.xhtml http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml http://media.chikuyonok.ru/ambilight/ http://9elements.com/io/projects/html5/canvas/ http://www.canvasdemos.com/

Contenu connexe

Tendances

From jQuery to App Store in 30 Minutes
From jQuery to App Store in 30 MinutesFrom jQuery to App Store in 30 Minutes
From jQuery to App Store in 30 Minutesedill3484
 
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStart
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStartEmbedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStart
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStartScott DeLoach
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingManuel Garcia
 
Flash Security, OWASP Chennai
Flash Security, OWASP ChennaiFlash Security, OWASP Chennai
Flash Security, OWASP Chennailavakumark
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de SitesCaelum
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTimothy Oxley
 
Rey Bango - HTML5: polyfills and shims
Rey Bango -  HTML5: polyfills and shimsRey Bango -  HTML5: polyfills and shims
Rey Bango - HTML5: polyfills and shimsStarTech Conference
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciarAndrelma
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciaremedomimgues
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciarEdna17
 
Android Programming Basics - Simple Pizza Delivery Application
Android Programming Basics - Simple Pizza Delivery ApplicationAndroid Programming Basics - Simple Pizza Delivery Application
Android Programming Basics - Simple Pizza Delivery ApplicationRiya Tirole
 

Tendances (20)

HTML+CSS Resources
HTML+CSS ResourcesHTML+CSS Resources
HTML+CSS Resources
 
From jQuery to App Store in 30 Minutes
From jQuery to App Store in 30 MinutesFrom jQuery to App Store in 30 Minutes
From jQuery to App Store in 30 Minutes
 
Jager
JagerJager
Jager
 
youtube
youtubeyoutube
youtube
 
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStart
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStartEmbedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStart
Embedded UA 101 - STC Summit 2013, Scott DeLoach, ClickStart
 
Slideshare
SlideshareSlideshare
Slideshare
 
Frontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser renderingFrontend Performance: Illusions & browser rendering
Frontend Performance: Illusions & browser rendering
 
Flash Security, OWASP Chennai
Flash Security, OWASP ChennaiFlash Security, OWASP Chennai
Flash Security, OWASP Chennai
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
 
Code dintegration videowall
Code dintegration videowallCode dintegration videowall
Code dintegration videowall
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Rey Bango - HTML5: polyfills and shims
Rey Bango -  HTML5: polyfills and shimsRey Bango -  HTML5: polyfills and shims
Rey Bango - HTML5: polyfills and shims
 
Embed for bit gravilty 6.txt
Embed for bit gravilty 6.txtEmbed for bit gravilty 6.txt
Embed for bit gravilty 6.txt
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciar
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciar
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciar
 
Blogs como gerenciar
Blogs como gerenciarBlogs como gerenciar
Blogs como gerenciar
 
Progressive Enhancement
Progressive EnhancementProgressive Enhancement
Progressive Enhancement
 
Android Programming Basics - Simple Pizza Delivery Application
Android Programming Basics - Simple Pizza Delivery ApplicationAndroid Programming Basics - Simple Pizza Delivery Application
Android Programming Basics - Simple Pizza Delivery Application
 
Video
VideoVideo
Video
 

Similaire à DoctypeHTML5 (Hyderabad) Presentation on Multimedia

ARTDM 170, Week 16: Publishing
ARTDM 170, Week 16: PublishingARTDM 170, Week 16: Publishing
ARTDM 170, Week 16: PublishingGilbert Guerrero
 
Filling the HTML5 Gaps with Polyfills and Shims
Filling the HTML5 Gaps with Polyfills and ShimsFilling the HTML5 Gaps with Polyfills and Shims
Filling the HTML5 Gaps with Polyfills and Shimsreybango
 
Ie9 dev overview (300) beta
Ie9 dev overview (300) betaIe9 dev overview (300) beta
Ie9 dev overview (300) betaKirk Yamamoto
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersTodd Anglin
 
Mobile Web Video
Mobile Web VideoMobile Web Video
Mobile Web VideoSarah Allen
 
Lca2009 Video A11y
Lca2009 Video A11yLca2009 Video A11y
Lca2009 Video A11yguesta3d158
 
HTML5 Multimedia
HTML5 MultimediaHTML5 Multimedia
HTML5 MultimediaSiddhi
 
HTML5 e Css3 - 8 | WebMaster & WebDesigner
HTML5 e Css3 - 8 | WebMaster & WebDesignerHTML5 e Css3 - 8 | WebMaster & WebDesigner
HTML5 e Css3 - 8 | WebMaster & WebDesignerMatteo Magni
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Steve Souders
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Sreejith Nair
 
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...Patrick Lauke
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerWalter Ebert
 
HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012steveheffernan
 

Similaire à DoctypeHTML5 (Hyderabad) Presentation on Multimedia (20)

ARTDM 170, Week 16: Publishing
ARTDM 170, Week 16: PublishingARTDM 170, Week 16: Publishing
ARTDM 170, Week 16: Publishing
 
Filling the HTML5 Gaps with Polyfills and Shims
Filling the HTML5 Gaps with Polyfills and ShimsFilling the HTML5 Gaps with Polyfills and Shims
Filling the HTML5 Gaps with Polyfills and Shims
 
Be HTML5-ready today
Be HTML5-ready todayBe HTML5-ready today
Be HTML5-ready today
 
HTML5
HTML5HTML5
HTML5
 
Web Apps
Web AppsWeb Apps
Web Apps
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Ie9 dev overview (300) beta
Ie9 dev overview (300) betaIe9 dev overview (300) beta
Ie9 dev overview (300) beta
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
Mobile Web Video
Mobile Web VideoMobile Web Video
Mobile Web Video
 
Html5 - Novas Tags na Prática!
Html5 - Novas Tags na Prática!Html5 - Novas Tags na Prática!
Html5 - Novas Tags na Prática!
 
Lca2009 Video A11y
Lca2009 Video A11yLca2009 Video A11y
Lca2009 Video A11y
 
HTML5 Multimedia
HTML5 MultimediaHTML5 Multimedia
HTML5 Multimedia
 
HTML5 e Css3 - 8 | WebMaster & WebDesigner
HTML5 e Css3 - 8 | WebMaster & WebDesignerHTML5 e Css3 - 8 | WebMaster & WebDesigner
HTML5 e Css3 - 8 | WebMaster & WebDesigner
 
GWT
GWTGWT
GWT
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Basics of html5, data_storage, css3
Basics of html5, data_storage, css3Basics of html5, data_storage, css3
Basics of html5, data_storage, css3
 
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...
HTML5 multimedia - browser-native video, audio and canvas - meet.js Summit / ...
 
EPiServer Web Parts
EPiServer Web PartsEPiServer Web Parts
EPiServer Web Parts
 
Responsive Videos, mehr oder weniger
Responsive Videos, mehr oder wenigerResponsive Videos, mehr oder weniger
Responsive Videos, mehr oder weniger
 
HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012HTML5 Video Player - HTML5 Dev Conf 2012
HTML5 Video Player - HTML5 Dev Conf 2012
 

Plus de Parashuram N

React Native - Fabric review-2018-07-25
React Native - Fabric review-2018-07-25React Native - Fabric review-2018-07-25
React Native - Fabric review-2018-07-25Parashuram N
 
Chain React 2018 - The state of React Native
Chain React 2018 - The state of React NativeChain React 2018 - The state of React Native
Chain React 2018 - The state of React NativeParashuram N
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceParashuram N
 
Understanding Javascript Engines
Understanding Javascript Engines Understanding Javascript Engines
Understanding Javascript Engines Parashuram N
 
Indexed db - the store in the browser
Indexed db - the store in the browserIndexed db - the store in the browser
Indexed db - the store in the browserParashuram N
 

Plus de Parashuram N (8)

React Native - Fabric review-2018-07-25
React Native - Fabric review-2018-07-25React Native - Fabric review-2018-07-25
React Native - Fabric review-2018-07-25
 
Chain React 2018 - The state of React Native
Chain React 2018 - The state of React NativeChain React 2018 - The state of React Native
Chain React 2018 - The state of React Native
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Client storage
Client storageClient storage
Client storage
 
Understanding Javascript Engines
Understanding Javascript Engines Understanding Javascript Engines
Understanding Javascript Engines
 
Indexed DB
Indexed DBIndexed DB
Indexed DB
 
Indexed db - the store in the browser
Indexed db - the store in the browserIndexed db - the store in the browser
Indexed db - the store in the browser
 
Snapp
SnappSnapp
Snapp
 

Dernier

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 

Dernier (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 

DoctypeHTML5 (Hyderabad) Presentation on Multimedia

  • 1. HTML5 Multimedia Canvas, Audio, Video and more..
  • 2. Agenda Canvas Audio Video SVG WebGL
  • 3. whoami /r Parashuram Work for a company that makes browsers Web Enthusiast – spends time writing code Worked on IndexedDB standards and demos http://nparashuram.com http://blog.nparashuram.com @nparashuram
  • 5. Pixel based drawing surface 2d context The drawing API Lines and Curves Fille and Gradients Image data, security context GPU accelerated, possible trace-JITed JS code Works well with Videos, WebWorkers Canvas
  • 6. Canvas - Code <canvas id = “myCanvas” width = “100px” height = “100px” style = “width:200px;height:200px”> Canvasnot supported </canvas> <script> varelem= document.getElementById('myCanvas'); </script>
  • 7. Canvas - Code varcontext = elem.getContext('2d'); context.fillRect(0, 0, 150, 100); context.moveTo(10, 10); context.lineTo(100, 10); context.stroke(); context.closePath(); context.drawImage(img_elem, dx, dy, dw, dh);
  • 8. Canvas - Code context.font = 'italic 30px sans-serif'; context.strokeText('Hello world!', 0, 50); context.fillText ('Hello world!', 0, 0); context.shadowColor = 'rgba(255, 0, 0, 0.5)'; context.shadowBlur = 4; context.shadowColor = 'rgba(255, 0, 0, 0.5)'; context.fillRect(20, 20, 150, 100); var g= context.createLinearGradient(sx, sy, dx, dy); context.fillStyle = g;
  • 9. Canvas - Demos http://canvaspaint.org/ http://nparashuram.com/seamcarving/index.html http://www.canvasdemos.com/type/games/ http://www.benjoffe.com/code/demos/canvascape/ http://caniuse.com/#search=canvas
  • 10. Video Native support to play video in browser Codecs (What data is stored) H.264 Theora VP8 Containers (How data is stored) MPEG4 Flash Ogg WebM Should be Served with correct MIME-TYPE Fallback mechanism
  • 11. Video - Code <video poster="star.png" autoplay loop preload controls > <sourcesrc="movie.webm" type='video/webm; codecs="vp8, vorbis"' /> <sourcesrc="movie.mp4" type='video/mp4;codecs="avc1.42E01E,mp4a.40.2"'/> Video tag not supported. Use Flash Tags here or Download <a href="movie.webm">here</a>. <video>
  • 12. Video - Code video.play(); video.pause() video.playbackRate = 0.8; video.addTrack(kind, label, language) onPlay, canplaythrough, progress, stalled, loadeddata, loadedmetadata, waiting,
  • 13. Video - Demos http://html5demos.com/video http://html5demos.com/two-videos http://sublimevideo.net/demo http://caniuse.com/video
  • 14. Audio Native support for sound Controls, API similar to Video Play audio files, control playback Audio Data API – work in progress
  • 15. Audio - Code <audiocontrols preload="auto" autobuffer>   <sourcesrc="elvis.mp3" /> <sourcesrc="elvis.ogg" />  <!-- now include flash fall back --> </audio>
  • 16. Audio - Demos http://www.jplayer.org/latest/demo-01/# http://tinyurl.com/4v8yu42 http://apm.ircam.fr/page/audio-tag/
  • 17. SVG XML Based Scalable Vector Graphics Embed inline in HTML Scalable Images Elements scriptable on DOM SVG in CSS as background images SVG Filters for Video
  • 18. SVG - Code <svgxmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width='300px' height='300px'> <title> Small SVG example </title> <circle cx='120' cy='150' r='60' style='fill: gold;'> <animateattributeName='r' from='2' to='80' begin='0' dur='3' repeatCount='indefinite' /> </circle> <polyline points='120 30, 25 150, 290 150' stroke-width='4’ stroke='brown' style='fill: none;' /> <text x='60' y='250' fill='blue'> Hello, World! </text> </svg>
  • 19. SVG - Demo http://svg-edit.googlecode.com/svn/branches/2.4/editor/svg-editor.html http://slides.html5rocks.com/#inline-svg http://caniuse.com/svg-html5
  • 20. WebGL 3D Graphics API Based on OpenGL ES 2.0 On Canvas element Learning WebGL Demos http://www.ambiera.com/coppercube/webgldemos.html http://www.khronos.org/webgl/wiki/Demo_Repository
  • 21. Demos http://www.craftymind.com/factory/html5video/CanvasVideo.html https://developer.mozilla.org/samples/video/chroma-key/index.xhtml http://people.mozilla.com/~prouget/demos/DynamicContentInjection/play.xhtml http://media.chikuyonok.ru/ambilight/ http://9elements.com/io/projects/html5/canvas/ http://www.canvasdemos.com/