HTML and CSS Reference
In-Depth Information
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, con-
trols, 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 the <video> element as an image source in the <can-
vas> element:
Using <canvas> with <video>
• <video> as a parameter to context.drawImage()
• context.globalAlpha
• context.globalCompositeOperation
• Using context.getImageData() and con-
text.putImageData() to process the video
259 260 258 261
Look for this icon
throughout the chapter to quickly locate the topics
outlined in this table.
This chapter covers
• Navigating the cross-browser and cross-device issues inherent in video
• Converting between different audio and video formats
• Controlling video playback
 
Search WWH ::




Custom Search