Backwards Compatible

playlist object gets created and populated with the tracks found in the <audio> tag.

Simple Play
Next
Prev
currentTrack: [[ mediaPlayer.currentTrack ]]
: [[ mediaPlayer.formatTime ]]
volume: [[ mediaPlayer.volume * 100 | number:0 ]]%
[[ mediaPlayer.formatTime ]]/[[ mediaPlayer.formatDuration ]]

Purpose

This is to give some sort of compatibility for audio tags already present in webpages where you can include this directive.

HTML of the classic audio tag

<audio> <source src="http://upload.wikimedia.org/wikipedia/en/d/d0/Rick_Astley_-_Never_Gonna_Give_You_Up.ogg" type="audio/ogg"> </audio>

Just by adding the media-player directive, it will read the source element(s) and instantiate a playlist containing it.

HTML with angular-media-player

<audio player-control="mediaPlayer" playlist="audioPlaylist" media-player> <source src="http://upload.wikimedia.org/wikipedia/en/d/d0/Rick_Astley_-_Never_Gonna_Give_You_Up.ogg" type="audio/ogg"> </audio>

Resulting $scope.audioPlaylist in the controller

  audioPlaylist = [[ audioPlaylist | json ]]