diff options
author | Holger Brunn <opensource@holgerbrunn.net> | 2013-01-24 16:13:17 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-28 13:26:11 -0500 |
commit | 959aebe07fffe334bf3dc3f2bfcf9c5e77fad92a (patch) | |
tree | e38e598eb859fdb906d8055c4d2724a62e854c0e /lib/class | |
parent | 499aef74145a32db8c73aeacb9c5d2dd5da40771 (diff) | |
download | ampache-959aebe07fffe334bf3dc3f2bfcf9c5e77fad92a.tar.gz ampache-959aebe07fffe334bf3dc3f2bfcf9c5e77fad92a.tar.bz2 ampache-959aebe07fffe334bf3dc3f2bfcf9c5e77fad92a.zip |
Add an HTML5 player
Merge request #20. Basic, not very pretty, but works and, unlike the
Flash player, is maintainable.
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/stream.class.php | 4 | ||||
-rw-r--r-- | lib/class/stream_playlist.class.php | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 338898a2..7304891c 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -144,8 +144,8 @@ class Stream { * This is a rather complex function that starts the transcoding or * resampling of a song and returns the opened file handle. */ - public static function start_transcode($song) { - $transcode_settings = $song->get_transcode_settings(); + public static function start_transcode($song, $type = null) { + $transcode_settings = $song->get_transcode_settings($type); // Bail out early if we're unutterably broken if ($transcode_settings == false) { debug_event('stream', 'Transcode requested, but get_transcode_settings failed', 2); diff --git a/lib/class/stream_playlist.class.php b/lib/class/stream_playlist.class.php index 6d85f8f0..1f8b4b88 100644 --- a/lib/class/stream_playlist.class.php +++ b/lib/class/stream_playlist.class.php @@ -160,6 +160,7 @@ class Stream_Playlist { case 'democratic': case 'localplay': case 'xspf_player': + case 'html5_player': // These are valid, but witchy $redirect = false; unset($ext); @@ -396,6 +397,15 @@ class Stream_Playlist { } // create_xspf_player /** + * create_html5_player + * + * Creates an html5 player. + */ + public function create_html5_player() { + require Config::get('prefix') . '/templates/create_html5_player.inc.php'; + } + + /** * create_localplay * This calls the Localplay API to add the URLs and then start playback */ @@ -450,7 +460,5 @@ class Stream_Playlist { echo $url->url . "\n"; } } // create_ram - } - ?> |