Skip to Content
HTML5 in Action
book

HTML5 in Action

by Greg Wanish, Rob Crowther, Joe Lennon, Charles Brindle
February 2014
Intermediate to advanced
466 pages
16h
English
Manning Publications
Content preview from HTML5 in Action

Chapter 8. Video and audio: playing media in the browser

Chapter 8 at a glance

Topic

Description, methods, and so on

Page

<video> element Using declarative markup to embed video in web pages:  
 
  • The <video> element
  • Common <video> element attributes: src, controls, width, height
  • The <source> element
241 242 248
Media Element Interface Controlling video and audio through JavaScript:  
 
  • The src DOM attribute
  • The play() method
  • The currentSrc DOM attribute
  • currentTime, duration, and playbackRate DOM attributes
242 244 249 255
Using <canvas> with <video> Using the <video> element as an image source in the <canvas> element:  
 
  • <video> as a parameter to context.drawImage()
  • context.globalAlpha ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML5 Programmer’s Reference

HTML5 Programmer’s Reference

Jonathan Reid

Publisher Resources

ISBN: 9781617290497Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link