You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are times when I would like to stream audio directly to my laptop or phone instead of using the default mpd output device. I would like to have a link at the top right of the now playing module that would provide a dynamically generated playlist containing mp3 urls that would be compatible with any streaming media player like vlc. So the first step would be a new php script named getPlaylist that accepted an id for each playlist. It would generate the playlist contents to point to each mp3 file as a url that could be accessed from any LAN device. This would also require a new script like getFile.php that accepted an id or file name and returned the raw binary contents of the file. The link displayed in the now playing module would reflect the playlist currently in use.
It would be useful to have a new checkbox in the settings labeled "use custom protocol for playlists." Then underneath that checkbox there would be a text box where users could enter any protocol to be added to the playlist url. For example, instead of http://whatever/playlist it could be vlc://whatever/playlist. The vlc protocol handler would then open the playlist in vlc. See the link below for info on setting up a new protocol handler in Linux.
EDIT:
Another option would be to display a small 'export playlist' icon at the top right of the now playing box. Clicking the icon would then open the playlist in a new tab or, if using a custom protocol handler, in the appropriate app.
You can use the code below to see what a link would look like at the right of the now playing box. Just type javascript: into your browser and then paste the following...
Enhancement for now playing:
There are times when I would like to stream audio directly to my laptop or phone instead of using the default mpd output device. I would like to have a link at the top right of the now playing module that would provide a dynamically generated playlist containing mp3 urls that would be compatible with any streaming media player like vlc. So the first step would be a new php script named getPlaylist that accepted an id for each playlist. It would generate the playlist contents to point to each mp3 file as a url that could be accessed from any LAN device. This would also require a new script like getFile.php that accepted an id or file name and returned the raw binary contents of the file. The link displayed in the now playing module would reflect the playlist currently in use.
It would be useful to have a new checkbox in the settings labeled "use custom protocol for playlists." Then underneath that checkbox there would be a text box where users could enter any protocol to be added to the playlist url. For example, instead of http://whatever/playlist it could be vlc://whatever/playlist. The vlc protocol handler would then open the playlist in vlc. See the link below for info on setting up a new protocol handler in Linux.
https://medium.com/swlh/custom-protocol-handling-how-to-8ac41ff651eb
EDIT:
Another option would be to display a small 'export playlist' icon at the top right of the now playing box. Clicking the icon would then open the playlist in a new tab or, if using a custom protocol handler, in the appropriate app.
You can use the code below to see what a link would look like at the right of the now playing box. Just type javascript: into your browser and then paste the following...
$('#nptext').html('<div style="float:right; font-size:11px;"><a href="#" target="_blank">http://' + document.domain + '/rompr/getPlaylist.php?name=' + $('.playlist').attr('name') + '</a></div>'); alert(1);
The text was updated successfully, but these errors were encountered: