This course is not a W3C course.
Views expressed are my own.
Dies ist kein W3C-Kurs.
Alle Ansichten sind meine Eigenen.
audio
elementvideo
elementaudio
and video
elements work?<video width="320" height="240" controls>
<source src="pr6.mp4" type="video/mp4">
<source src="pr6.webm" type="video/webm">
</video>
<video>
<source src="lowres.mp4" media="max-width: 500px">
<source src="highres.mp4">
</video>
poster — displays an image when stopped
controls – display start/stop/volume controls
autoplay – starts the resource on load (don’t use!)
loop – loops the media resource
muted – starts muted
<video src="foo.ogv">
<track kind="subtitles"
label="English subtitles"
src="subtitles_en.vtt"
srclang="en" default>
</track>
<track kind="subtitles"
label="Deutsche Untertitel"
src="subtitles_de.vtt"
srclang="de">
</track>
</video>
WEBVTT FILE
railroad
00:00:10.000 --> 00:00:12.500
Left uninspired by the crust of railroad earth
manuscript
00:00:13.200 --> 00:00:16.900
that touched the lead to the pages of your manuscript.
More information @ HTML5Rocks.com
*See what sucks
<audio>
<source src="music.mp3" type="audio/mpeg">
<source src="music.oga" type="audio/ogg" >
</audio>
var video = document.getElementById('video');
var playpause = document.getElementById('playpause');
video.onpause = function(e) {
playpause.value = 'Play';
playpause.onclick = function(e) {
video.play();
}
}
video.onplay = funtion(e) {
playpause.value = 'Pause';
playpause.onclick = function(e) {
video.pause();
}
}