HTML <audio> and <video> elements

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

audio code example

<audio controls> <source src="file1.ogg" type="audio/ogg"> <source src="file1.mp3" type="audio/mpeg"> your browser does not support the audio element. </audio>

media type attribute MP4

video/mp4

media type attribute WebM

video/webm

text between tags

will display in browsers that do not support audio element

source tag syntax

<source src="" type"">

video code example

<video controls> <source src="file1.ogg" type="video/ogg"> <source src="file1.mp4" type="video/mp4"> your browser does not support the audio element. </video>

supported audio file formats

MP3 (all browsers) Wav (not IE) Ogg (not IE or Safari)

supported video file formats

MP4 (all browsers) WebM (not IE or Safari) Ogg (not IE or Safari)

multiple source elements

are ok, browser will use first recognized format

media type attribute MP3

audio/mpeg

media type attribute Ogg

audio/ogg video/ogg

media type attribute Wav

audio/wav

controls

controls element adds play, pause, volume

page will flicker

if you don't set the width and height

<track>

specifies next tracks for media elements (<audio> and <video>)


Ensembles d'études connexes

Ch 69 - Autoimmune disorders, neurologic infections, neuropathies

View Set

Prepu: Chapter 3: Growth and Development of the Newborn and Infant

View Set

Chapter 2: Economic Systems and Decision Making

View Set

CSCS Chapter 14 - Warm Up and Flexibility Training

View Set

Combo with "computer forensics - quiz 1" and 7 others

View Set

Chapter 2 International business

View Set

chapter nine chronic illness and disease

View Set

Segment 8: The Mortgage Loan Application

View Set