Integrated Web Browser and playlists

Moderators: Support Team UK, Support Coordinator

Integrated Web Browser and playlists

Postby BMF » 30.03.2010, 13:10

I've got a question regarding the web browser integrated in MusicPal (Menu: Extras > HMTL Browser).

I've developped a tiny php application that allow me to access my music collection through web on the MusicPal (this will allow my brother to access my collection on his MusicPal remotely from internet, so forget upnp servers and NFS shares), but I'm facing a major problem: playlists!

Navigation and display of the webpages are OK on MusicPal, playing a single song directly from its url is OK either.
But as long as I want to launch a playlist from a web page it doesn't work. All playlists are displayed as plain text by the browser and not interpreted as playlists... I've tried with playlists as m3u, pls and even podcast (xml structure).

- Are there any limitations on this web browser (I think it's Opera Mini integrated in MusicPal) that prevent to use playlists ?
- Are there any trick I can use to launch a playlist from a webpage in order to play several songs queued ?
- Where could I get the whole specifications regarding this browser ? (It seems it's not the same implementation that the Opera Mini available on the market)

Thanks.
BMF
 
Posts: 10
Joined: 16.12.2008, 12:28

Re: Integrated Web Browser and playlists

Postby BMF » 30.03.2010, 15:39

After further tests I found that the browser doesn't recognize mime types even when forcing it through headers to get on the fly an audio/x-mpegurl with a filename like playlist.m3u
see: http://www.php.net/manual/fr/function.header.php

The browser only recognize hardcoded file extensions...

A page with an url like this one: minizik.php?gpid=2884&trackid=3 will always be parsed as html file even it works as m3u playlist on any other browsers.

So I've played with my webserver .htaccess and RewriteRule to get on the fly files with an .m3u extension in order to fool MusicPal's web browser:
pls-2884-6.m3u (for the client) is minizik.php?gpid=2884&trackid=6 (for the server)

And it works!! Yeah! The browser accept it as m3u playlist and the songs can be played :D

Here is the rewrite rule for the .htaccess file:
Code: Select all
RewriteEngine on
RewriteRule ^pls-([0-9]+)-([0-9]+)\.m3u$  minizik.php?gpid=$1&trackid=$2  [L]



So now I've got the next issues:
- how to display the name of the song currently played? as it display only the name of the playlist file... MusicPal doesn't seem to recognize song titles defined in the m3u playlist...
- how to go to next and previous song in the playlist manually instead of waiting untill a song is finished playing to switch to next one?
BMF
 
Posts: 10
Joined: 16.12.2008, 12:28

Re: Integrated Web Browser and playlists

Postby The_SZ » 31.03.2010, 07:45

The html browser is pretty simple. Its not Opera based.

The song name is fetched from the 'Content-Disposition: attachment; filename="file.mp3"' http header of the link or from a shoutcast stream. shoutcast stream means the song name is embedded inside the mp3 stream. The names from the m3u file are not taken.
The_SZ
 
Posts: 425
Joined: 03.03.2008, 11:25

Re: Integrated Web Browser and playlists

Postby BMF » 02.04.2010, 15:51

It seems that when using a m3u playlist, the MusicPal doesn't use the filename of mp3 files... (I stream mp3 files directly from Apache). It think it uses other metadata to get title from streams, may be "icy-metadata" (feature from icecast servers and also implemented in shoutcast streams).
I'll investigate further when I'll get time for that...
BMF
 
Posts: 10
Joined: 16.12.2008, 12:28

Re: Integrated Web Browser and playlists

Postby BMF » 19.07.2010, 09:55

The_SZ wrote:The html browser is pretty simple. Its not Opera based.


So why the "user-agent" of MusicPal browser is "Opera Nokia3250" then???
BMF
 
Posts: 10
Joined: 16.12.2008, 12:28

Re: Integrated Web Browser and playlists

Postby The_SZ » 24.07.2010, 19:33

Because a lot of websites check the user agent and deliver a optimized website for this handheld device. e.g. google. "Opera Nokia3250" returned the most usefull.
The_SZ
 
Posts: 425
Joined: 03.03.2008, 11:25


Return to MusicPal