Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-20 Thread Roland0


SeanBurlington wrote: 
> I'm developing the app in ReactJS - which provides a proxy for
> development - and the next step was to test it as an installable PWA -
> which requires https and a valid cert so I used apache as a proxy for
> that too.
> Docker isn't intended as a distribution mechanism - it just seemed
> easier than describing how to setup a proxy - and  
> 
(I'm assuming you meant web server and not proxy?)
Well, the question is if you want an average LMS user to be able to
install it.
With a plugin, that's a realistic prospect.
With having to install/configure/run a web server (and maybe even get a
ssl cert) and deploy the app to it, probably not so much.

> 
> I don't know how to make it a plugin (I have looked for docs but some
> are outdated - and it's been 20 years since I wrote any non-trivial
> Perl)
> 
That's why I mentioned Material and extGUI4LMS, which both take the
approach I described. You can just copy/paste/adapt the relevant parts.

> 
> I have to admit that despite being a user for a decade LMS has more
> features than I knew - have I also missed per user favourites lists ?
> 
No, but you can (persistently) save plugin preferences, which your app
could map to users.

> 
> Yes - that's what I'm thinking.
> LMS offers *so much* functionality that exposing it via the web would be
> a significant risk.
> Exposing via a proxy which only allows a subset of functionality
> (perhaps just browse and download MP3) would mean that even if user
> login was hacked - all that would gain is access to data and a possible
> DOS attack.
> But it would be much harder in such a system to gain code execution.
> 
Not sure what architecture you have in mind, but this subset of
functionality would have to be severely restricted (e.g. a plugin I've
seen registers a LMS server command which allows to execute any system
command on the LMS server)

> 
> Web apps have a lot more power than they used to.
> It is possible to store significant amounts of data in places like
> indexdb
> Not the whole of a collection - but enough to be useful.
> 
I'm aware of indexdb (although the file systems API may be a better fit
for this use case (provided it actually works in the current browsers))
I was thinking about the issues of synchronizing in general (e.g how
would the app notice that a file has changed / has been deleted on the
server etc.)
Even if the app just just downloads some manually selected albums,
there'd have to be some admin UI to e.g. delete local data
At this point, personally, I'd just install syncthing instead and be
done with it.



'Various SW' (https://www.nexus0.net/pub/sw/): Web Interface | TUI |
Playlist Editor / Generator | Music Classification | Similar Music |
Announce | EventTrigger | Chiptunes | LMSlib2go | ...
'Various HowTos' (https://www.nexus0.net/pub/documents/LMS/): build a
self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-20 Thread bpa


SeanBurlington wrote: 
> Sounds interesting that you got this far.
> 
> I think it may need a proxy service rather than be a plugin - I mean
> maybe websockets could be added to LMS - but I don't want to learn that
> much Perl.
> 
> I was playing around with websockets and have a small server that
> proxies the TCP connection from LMS to the web via a websocket
> 
> I've only used it to play with sending RPC commands back and forth it
> seems to work 

The design decision to use Websockets in LMS so that whole system could
be done in Perl and packaged as a plugin (the JS would be in a webpage
hosted by LMS) .  This could be installed easily and would work on any
LMS installation not matter which OS. A proxy means various builds have
to be maintained (e.g. Windows, MacOS, Linux/Arm Linux/x86 etc) 


> However - my app doesn't stream at all and so doesn't work with
> streaming services
You don't know where this will end up so I am suggesting be aware.

> oh - and youtube downloader is back 

I know but the very fact that somebody litigated means you may need to
be careful both for yourself and the LMS community. Large companies
don't mind spending money on a losing case making life miserable for an
individual for a few years - if it deters others.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-20 Thread SeanBurlington


bpa wrote: 
> A couple of years ago, I worked up a prototype of a Slimproto in JS and
> using HTML5 AudioWorkers (??) .
> Main problem is that for client to work with LMS it needs a full duplex
> TCP connection - I tried with WebSockets but LMS AnyEvent is too old.
> There are also problems with AudioWorkers.
> 
> To have a Slimproto solution, you need to have a full duplex connection
> with LMS. - not HTTP.
> 
> 

Sounds interesting that you got this far.

I think it may need a proxy service rather than be a plugin - I mean
maybe websockets could be added to LMS - but I don't want to learn that
much Perl.

I was playing around with websockets and have a small server that
proxies the TCP connection from LMS to the web via a websocket

I've only used it to play with sending RPC commands back and forth it
seems to work 

bpa wrote: 
> 
> Be careful. LMS is tolerated by streaming services with plugins because
> it does not offer a way to save streamed audio offline.  Saving audio
> may infringe rights and so incur litigation. (e.g. you play & save music
> on your player from Youtube)
> https://www.digitalmusicnews.com/2020/10/26/youtube-downloader-github-takedown/

I don't think the Music companies are very keen on CDs at this point -
they would much rather we pay for every listen.

However - my app doesn't stream at all and so doesn't work with
streaming services - all I'm proposing doing is caching a copy of music
you already own on your mobile for later playback - not in a format that
would be easily copied to another device.

Right now it is using the existing functionality of LMS to download the
files which exists in other themes - in fact those download the files as
files - what I'm doing is less of an issue as I just play them and the
only place they are currently stored is browser cache.

Even it is is possible to stream over websockets - I don't think it
would make sense to store this data as it would not be tracks and just a
continuous stream - wouldn't it ?

oh - and youtube downloader is back
https://thenextweb.com/dd/2020/11/17/github-restores-youtube-dl-three-weeks-after-ban/
:)



SeanBurlington's Profile: http://forums.slimdevices.com/member.php?userid=70806
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-20 Thread bpa


SeanBurlington wrote: 
> Yep - and I'm curious if this might be possible but for now the mp3
> approach does what I want 
A couple of years ago, I worked up a prototype of a Slimproto in JS and
using HTML AudioWorkers (??) .
Main problem is that for client to work with LMS it needs a full duplex
TCP connection - I tried with WebSockets but LMS AnyEvent is too old.
There are also problems with AudioWorkers.

To have a Slimproto solution, you need to have a full duplex connection
with LMS. - not HTTP.

> It is possible to store significant amounts of data in places like
> indexdb
> 
> Not the whole of a collection - but enough to be usefu

Be careful. LMS is tolerated by streaming services with plugins is
because it does not offer a way to save streamed audio offline.  Saving
audio may infringe rights and so incur litigation.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-20 Thread SeanBurlington


Roland0 wrote: 
> Since the app only consists of static pages, it can be packaged as a
> plugin and delivered to the browser using LMS' built-in web server
> (which is what Material and extGUI4LMS do), eliminating the need for
> docker just for a web server


I'm developing the app in ReactJS - which provides a proxy for
development - and the next step was to test it as an installable PWA -
which requires https and a valid cert so I used apache as a proxy for
that too.

Docker isn't intended as a distribution mechanism - it just seemed
easier than describing how to setup a proxy - and  I don't know how to
make it a plugin (I have looked for docs but some are outdated - and
it's been 20 years since I wrote any non-trivial Perl)

Roland0 wrote: 
> 
> As it uses LMS' mp3 streaming, synchronization won't be possible (you'd
> have to use SlimProto instead), 
> 

Yep - and I'm curious if this might be possible but for now the mp3
approach does what I want 

Roland0 wrote: 
> 
> user personalisation doesn't need a server
> 

I have to admit that despite being a user for a decade LMS has more
features than I knew - have I also missed per user favourites lists ?


Roland0 wrote: 
> 
> strict access control  won't be possible unless you somehow proxy all
> data (including audio) over some other server which handles this task
> independently of LMS.
> 

Yes - that's what I'm thinking.

LMS offers *so much* functionality that exposing it via the web would be
a significant risk.

Exposing via a proxy which only allows a subset of functionality
(perhaps just browse and download MP3) would mean that even if user
login was hacked - all that would gain is access to data and a possible
DOS attack.

But it would be much harder in such a system to gain code execution.


Roland0 wrote: 
> 
> And I'm a bit confused about how you plan to archive "offline playback"
> without synchronizing the audio files to the local device (which afaik
> can't realistically be done with a web app)
> 

Web apps have a lot more power than they used to.

It is possible to store significant amounts of data in places like
indexdb

Not the whole of a collection - but enough to be useful.

I haven't done this yet - this app is a learning exercise for me.



SeanBurlington's Profile: http://forums.slimdevices.com/member.php?userid=70806
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-19 Thread Roland0


SeanBurlington wrote: 
> 
> I'm not sure whether this app would be better done as a skin, if it
> could be incorporated into Material skin, 
> 
Since the app only consists of static pages, it can be packaged as a
plugin and delivered to the browser using LMS' built-in web server
(which is what Material and extGUI4LMS do), eliminating the need for
docker just for a web server
As it uses LMS' mp3 streaming, synchronization won't be possible (you'd
have to use SlimProto instead), 

> 
> or if it might be better to build a stronger server side element 
> One idea would be to provide a server element with strict access control
> - user personalisation (eg favourites and last played) while limiting
> access to things like system settings - such that the app might be safe
> to expose to the internet and accessible for remote use without a VPN.
> 
user personalisation doesn't need a server
strict access control  won't be possible unless you somehow proxy all
data (including audio) over some other server which handles this task
independently of LMS.
And I'm a bit confused about how you plan to archive "offline playback"
without synchronizing the audio files to the local device (which afaik
can't realistically be done with a web app)



'Various SW' (https://www.nexus0.net/pub/sw/): Web Interface | TUI |
Playlist Editor / Generator | Music Classification | Similar Music |
Announce | EventTrigger | Chiptunes | LMSlib2go | ...
'Various HowTos' (https://www.nexus0.net/pub/documents/LMS/): build a
self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


[SlimDevices: Plugins] Squeezebox-web - a web based player

2020-11-19 Thread SeanBurlington


Hey all,
some of you might be interested that I am working on a web based
player

https://gitlab.com/tangiblebytes/squeezebox/squeezebox-web

This is very much a work in progress and has limited functionality.

But you can browse albums and play albums via a web page - which is
useful to me.

If you want to have a play - the easiest way if probably to run the
docker image


Code:

docker run --env LMS_HOST="http://192.168.1.118:9000;  -dit --name squeezy  
-p 8080:80 registry.gitlab.com/tangiblebytes/squeezebox/squeezebox-web



Edit LMS_HOST  variable to point to your server before you run this -
and then visit http://localhost:8080 to see it running.

I'm not sure whether this app would be better done as a skin, if it
could be incorporated into Material skin, or if it might be better to
build a stronger server side element 

One idea would be to provide a server element with strict access control
- user personalisation (eg favourites and last played) while limiting
access to things like system settings - such that the app might be safe
to expose to the internet and accessible for remote use without a VPN.


Album list
32243


Playback
32244


+---+
|Filename: playback.jpg |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=32244|
+---+


SeanBurlington's Profile: http://forums.slimdevices.com/member.php?userid=70806
View this thread: http://forums.slimdevices.com/showthread.php?t=113262

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins