Do not issue any bug reports against versions earlier than 3.5.4 they will be closed.
Furthermore, we cannot accept bugs about metadata or art handling in 3.5.4 due to the large number of bugs that have been fixed since then. 3.5.4 in general is becoming less supportable, and it is suggested to try to reproduce the bug in the latest nightly.
Before submitting a bug please read http://ampache.org/wiki/support:bugs failure to do so may delay resolution of your report.
Furthermore, we cannot accept bugs about metadata or art handling in 3.5.4 due to the large number of bugs that have been fixed since then. 3.5.4 in general is becoming less supportable, and it is suggested to try to reproduce the bug in the latest nightly.
Before submitting a bug please read http://ampache.org/wiki/support:bugs failure to do so may delay resolution of your report.
FS#39 - Add Explicit Video Provider to XSPF Playlist For Video
Attached to Project:
Ampache
Opened by Kyle Fazzari (kyle.f) - Wednesday, 24 February 2010, 10:23 GMT-8
Last edited by Karl Vollmer (vollmerk) - Sunday, 21 March 2010, 06:07 GMT-8
Opened by Kyle Fazzari (kyle.f) - Wednesday, 24 February 2010, 10:23 GMT-8
Last edited by Karl Vollmer (vollmerk) - Sunday, 21 March 2010, 06:07 GMT-8
|
DetailsI have installed JW Flash Player 5 to avoid needing to transcode my music to MP3. It also supports video (either FLV or MP4 variants). However, video in JW Flash Player does not work with the default XSPF playlist out of the box from Ampache due to the lack of a meta tag like the following:
<meta rel="provider">video</meta> In order to get video functioning properly, some small changes must be made to Ampache. I would definitely appreciate the incorporation of these changes! First, the function Stream::create_xspf() must be updated to actually support video. As it is, the default case just pretends everything is a song, so we need to simply add another case for video and include the above meta tag. lib/class/stream.class.php: 433,442c433 < break; < case 'video': < $xml['track']['title'] = $media->title; < $xml['track']['creator'] = $media->f_artist_full; < $xml['track']['info'] = Config::get('web_path') . "/albums.php?action=show&album=" . $media->album; < $xml['track']['image'] = Config::get('web_path') . "/image.php?id=" . $media->album . "&thumb=3&sid=" . session_id(); < $xml['track']['album'] = $media->f_album_full; < // Video for JW Flash Player requires the following meta tag < $xml['track']['meta rel="provider"'] = "video"; < break; --- > break; Alright, that's nice. Unfortunately, xmlData::keyed_array() doesn't support tags with arguments (like $xml['track']['meta rel="provider"']). Since we kinda need it here (and I really do think this could be useful later on as well), let's change xmlData::keyed_array() to support tag arguments: /lib/class/xmldata.class.php: 159,174c159 < // Find the first space in the tag (from the left). If there is one, we can assume there is an argument < $positionOfSpace = strpos($key, ' '); < if ($positionOfSpace === false) // If there was no space < { < // Insert the tag like normal < $string .= "\t<$key><![CDATA[$value]]></$key>\n"; < } < else // If there was a space < { < // The opening tag and closing tag must be different. While the opening tag can contain < // the argument, the closing tag cannot. So, let's strip the argument for the closing < // tag. < $closingTag = substr($key, 0, $positionOfSpace); < // Insert the opening tag with the argument, and the closing tag without the argument < $string .= "\t<$key><![CDATA[$value]]></$closingTag>\n"; < } --- > $string .= "\t<$key><![CDATA[$value]]></$key>\n"; |
This task depends upon
Closed by Karl Vollmer (vollmerk)
Sunday, 21 March 2010, 06:07 GMT-8
Reason for closing: Fixed
Additional comments about closing: Resolved in r2334
Sunday, 21 March 2010, 06:07 GMT-8
Reason for closing: Fixed
Additional comments about closing: Resolved in r2334
Comment by Kyle Fazzari (kyle.f) -
Wednesday, 24 February 2010, 10:25 GMT-8
Ugh. I knew it would do that to my diffs. I can't for the life of me figure out how to add attachments, but I saw that this one does (http://ampache.org/bugs/task/29). Any advice there?
Comment by Karl Vollmer (vollmerk) -
Wednesday, 24 February 2010, 12:04 GMT-8
Cauuuse I hadn't checked the box that allowed "reporters" to do so, try it now.
Comment by Kyle Fazzari (kyle.f) -
Wednesday, 24 February 2010, 19:01 GMT-8
Ah! Alright, here they are.
stream.class.php.diff
(0.6 KiB)