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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | audio-register-xspf-player-606902-1.patch | 1.84 KB | David Lesieur |
| audio-register-xspf-player.patch | 711 bytes | David Lesieur |
Comments
Comment #1
David Lesieur commentedThis 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.
Comment #2
drewish commentedlooks good. committed to HEAD.