All the legacy <audio>
functionality inside a <video>
tag.
There are 2 videos in webm
format in this demo, you can play them using the same API.
mediaPlayer = {
playing: [[ mediaPlayer.playing ]]
currentTrack: [[ mediaPlayer.currentTrack ]]
tracks: [[ mediaPlayer.tracks ]]
volume: [[ mediaPlayer.volume ]]
formatDuration: [[ mediaPlayer.formatDuration ]]
duration: [[ mediaPlayer.duration ]]
currentTime: [[ mediaPlayer.currentTime ]]
formatTime: [[ mediaPlayer.formatTime ]]
loadPercent: [[ mediaPlayer.loadPercent ]]
};
angular.module('docs')
.controller('VideoController', function ($scope) {
$scope.videoPlaylist = [
{
src: 'http://video.webmfiles.org/big-buck-bunny_trailer.webm',
type: 'video/webm'
},
{
src: 'http://video.webmfiles.org/elephants-dream.webm',
type: 'video/webm'
}
];
});