Register XSPF player theme functions
David Lesieur - October 16, 2009 - 23:40
| Project: | Audio |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Description
An .inc file in the 'players' directory may provide a theme function for displaying an XSPF player, but that function never gets registered into the theme registry.
This patch solves that issue. After applying this patch, one may invoke the 'xspf_extended' player with code similar to this:
if ($player = audio_get_players('name', 'xspf_extended')) {
return theme($player['theme_xspf'], $xspf_playlist_url));
}... where $xspf_playlist_url is a variable containing the URL of an XSPF playlist.
| Attachment | Size |
|---|---|
| audio-register-xspf-player.patch | 711 bytes |

#1
This patch improves on the previous one by allowing:
I'm trying to integrate a skinnable player. I'm providing an item for each skin in hook_audio_player(), all of which are actually pointing to the same theme function. The options passed to the theme function identify the skin to use.
I can't have a separate theme function for each skin because my goal is to (eventually) dynamically find the skins by scanning files in the player's directory.
#2
looks good. committed to HEAD.