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 ...

Get HTML5 in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.