Squeeze Control for Android (support thread)

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Re: Chromecast is deaf and mute....

Excellent :) I'm glad that my incident revealed a fixable little bug.
Your app is a fine one (overall). However, I'd love to see someone - with your skills - developing an app for a ChormeCast that enables it to present itself as a SB playback device (a squeezeplayer) on my network - controllable by Apps like yours.
As far as I understand, it is possible to upload an "app"-like piece of code into the CC and it will run in it independant of my phone (or any other host device).
With a feature like that, I'd be thrilled to buy another CC and use it only as a dedicated player.

I've thought about it and it actually is impossible to build a Squeezebox player for Chromecast. Chromecast at it's core is just a chrome browser, all apps are running in the browser. The connection that a Squeezebox player has to make with the server for receiving control commands is not possible within the confines of a browser.

If you want something with the same form factor as the Chromecast but can act as a Squeezebox player, I would suggest getting the Amazon Fire TV Stick. It runs a full Android OS so you run my other app SB Player.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
Re: Chromecast is deaf and mute....

I do not know much about the CC and it's inner workings, but I do know an app named Dashboard Cast that allows me to use my phone to set up my CC to perform various real time tasks, including among others, an RSS feed as well as an internet radio stream (mp3) running continuously in parallel - even after I switch off my phone and leave the house.
So, I thought perhaps one could establish an mp3 stream from the LMS using a URL type mechanism?

If it is so that the CC is seen as a browser, does it mean that it can (or perhaps sometimes in the future will) support JavaScript and/or HTML 5 ?
If so, that would surely allow it to establish any kind of connection also the one required by LMS, or...?
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Re: Chromecast is deaf and mute....

I do not know much about the CC and it's inner workings, but I do know an app named Dashboard Cast that allows me to use my phone to set up my CC to perform various real time tasks, including among others, an RSS feed as well as an internet radio stream (mp3) running continuously in parallel - even after I switch off my phone and leave the house.
So, I thought perhaps one could establish an mp3 stream from the LMS using a URL type mechanism?

If it is so that the CC is seen as a browser, does it mean that it can (or perhaps sometimes in the future will) support JavaScript and/or HTML 5 ?
If so, that would surely allow it to establish any kind of connection also the one required by LMS, or...?

The CC isn't just seen as a browser, it is a browser and every app on the device is written in Javascript and HTML5 including the Squeeze Ctrl app (yes it is a custom app I had to write to make the Chromecast work with Squeeze Ctrl). Have you heard of ChromeOS or the Chromebook? The Chromecast is basically the same thing but without any direct input control; ie. keyboard and mouse.

Despite all the things that a browser can do these days, it actually is very limited when it comes to the number of ways it can connect to the server. The reason it can do all these things is because developers created server software to work within the limitations of the browser.

Both RSS and mp3 streams are something that any modern browser can do. That's because they both communicate with the server using the http protocol, which is what browsers are base around and is the only protocol that a browser can work with. Every music stream, video stream, news feed, that you receive in a browser is sent using the http protocol. (Actually a browser can also use the ftp protocol for downloading files, but that's beside the point). I'm also not including Java or Flash plugins/players, because Chromecast can't run them.

A Squeezebox player may stream music using the http protocol, but they also require another connection for receiving commands and sending back status info. That connection uses a protocol that was created specifically for Squeezebox players.

If you need further proof, just look at how long Squeezebox has been around and in all this time no one has ever written a player for the browser, without having to resort to using a Java applet.

Oh, and BTW, if it wasn't clear in the previous post, I have written a Squeezebox player app for Android, so I know how a Squeezebox Player works.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
Re: Chromecast is deaf and mute....

Thanks for taking the time to answer, but please do not believe that I am trying to contradict your expertise - I am not :)
Let me rephrase my desire:

Is it possible to connect to LMS using a simple URL and stream music that way?
This Wiki seems to indicate that it is: wiki.slimdevices.com/index.php/Remote_streaming
I've tried to paste a URL as explained into VLC, expecting the VLC to show up in Squeeze Ctrl as a player, but is doesn't work.

(P.S. this forum denies me to enter a URL into my conversation, that's why I couldn't provide an example)
 

ATinkler

New member
Apr 24, 2015
0
0
0
Visit site
Fair enough does sound like a fair bit of work. .double tap or some solution to get to that group volume would be great.

I'm use to squeeze commander default of group control of volume when synced so I guess it just means some rewiring of what I'm use to.

Dont really want server volume sync as i like to have by unit control too which this would remove. .

Cheers
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Re: Chromecast is deaf and mute....

Thanks for taking the time to answer, but please do not believe that I am trying to contradict your expertise - I am not :)
Let me rephrase my desire:

Is it possible to connect to LMS using a simple URL and stream music that way?
This Wiki seems to indicate that it is: wiki.slimdevices.com/index.php/Remote_streaming
I've tried to paste a URL as explained into VLC, expecting the VLC to show up in Squeeze Ctrl as a player, but is doesn't work.

(P.S. this forum denies me to enter a URL into my conversation, that's why I couldn't provide an example)

The feature you mentioned has been around for a very long time and it still works, I just tried it in Firefox and VLC.

Did you put in the right url? Also since you have a username and password on your server, you would need to include those in the url like this:

http://<username>:<password>@<server address>:<server port>/stream.mp3

There is a slight chance that putting the username and password in the url would run afoul of the browser or VLC's security measures.

However, even when it does work, it is not a great solution. There's generally a large lag time between pressing a button (play, pause, skip, etc.) and hearing the effect. I think it's because vlc and browsers cache as much of the stream as they can, so any changes the server makes to the stream when pausing or track skipping will not be heard until the browser or vlc plays through it's cache. Also the browser can't send info back in the browser about the stream that it's playing, so you won't see an accurate progress bar and of course everything is transcoded to mp3. If you're using a version of LMS that cannot transcode, you can't play anything other than mp3 files.

I remember that is used to work better, but that's probably because the old browsers were a lot less efficient at caching data and older computers didn't have as much memory to use as a cache.

BTW, why do you have a username and password on your server? If it is so you can safely access the server remotely, it is not a secure method at all. LMS uses a basic authentication method, which means that the username and password are sent as plain text (or encoded in a very known well way). Remote access would be a lot safer if you use a home router with a built-in VPN server.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
Re: Chromecast is deaf and mute....

Hi, and thank you so much for taking the time to reply :)
For some mysterious reason, today it worked when I plugged the URL into VLC. And the lag caused by buffering is almost not noticable. If I plug the URL directly into my chrome browser, i get a black screen with som basic audio control buttons in the center:
Capture.JPG
In either case (Browser or VLC), the Squeeze Ctrl identifies them both as "Mozilla from 192.168.07" which is the IP from the PC where I'm sitting.
Controlling the VLC (or Chrome) using Squeeze Ctrl, sometimes work, sometimes not. I haven't been able to figure out a pattern yet.
But at least, I am one step further :)
When I plug the URL into the ChromeCast (using Dashboard Cast), nothing happens. That could of course be because the audio feature in Dashboard cast is still in beta, and I do not expect you to provide support for someone else's App.

But let me ask you this; Is there another way to plug a URL into a ChromeCast? (without doing programming - I'm not a programmer).

Oh, and to the password issue with my NAS.... I have some friends and family that connect to my NAS remotely to play my songs. For minimum security, I chose to establish a username and password. I know this isn't very secure, but as my NAS contains nothing else but mp3 files, if someone truly wanted to break in and steal those, their welcome. :)
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Re: Chromecast is deaf and mute....

Controlling the VLC (or Chrome) using Squeeze Ctrl, sometimes work, sometimes not. I haven't been able to figure out a pattern yet.
But at least, I am one step further :)
This is the caching lag I'm talking about. Try starting a playback, and then pause it. If you wait long enough it will eventually pause. If you press play again, it will eventually play. This is because the controls aren't actually controlling VLC, they are just manipulating the stream being sent to the VLC. So when you press pause, the server just inserts silence into the stream, but you won't "hear" that silence until VLC has played through what it has already buffered.

But let me ask you this; Is there another way to plug a URL into a ChromeCast? (without doing programming - I'm not a programmer).
Have you tried casting a tab from the Chrome browser on your computer?
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
Re: Chromecast is deaf and mute....

Hi,
You're right about the buffering issue. It does take a long time for things to happen. But for the time being, I'm not too concerned about that.

But I fail to understand how casting a tab from Chrome would solve my problem? Sure, I can do that - and it works fine. But as soon as I close Chrome, the stream stops. My goal is to establish a permanent stream between my LMS and the ChromeCast....
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Re: Chromecast is deaf and mute....

But I fail to understand how casting a tab from Chrome would solve my problem? Sure, I can do that - and it works fine. But as soon as I close Chrome, the stream stops. My goal is to establish a permanent stream between my LMS and the ChromeCast....

Oh, I was just answer the question: But let me ask you this; Is there another way to plug a URL into a ChromeCast? (without doing programming - I'm not a programmer).
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
I see, but casting a tab to the CC establishes a connection with Chrome, and not with LMS, right?
Is there a way to make the CC connect directly to LMS?
 

mookz

New member
Jan 14, 2011
0
0
0
Visit site
I had some additional thoughts on Chromecast. Would it be possible to make the album art be a faded colored background? Or maybe put the album art in the upper right hand corner or right below the track information?

On the left side of the screen, just below the Squeeze Ctrl title, place the next 1 or 2 track titles? I think that the font size can be around half of everything else and it will still be fairly visible.
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
I see, but casting a tab to the CC establishes a connection with Chrome, and not with LMS, right?
Is there a way to make the CC connect directly to LMS?
When you cast a tab, the browser doesn't send the content of the tab, it just sends the URL the tab was viewing to the Chromecast. So the CC is connecting directly to LMS.
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
I had some additional thoughts on Chromecast. Would it be possible to make the album art be a faded colored background? Or maybe put the album art in the upper right hand corner or right below the track information?

On the left side of the screen, just below the Squeeze Ctrl title, place the next 1 or 2 track titles? I think that the font size can be around half of everything else and it will still be fairly visible.

The problem with changing design of the Chromecast display is that different people are going to want a different layout and there's no way to satisfy everyone. So instead I'm just going to keep it the way I like it, or at least until I think of a design I like better. Besides it's a relatively minor feature and I don't really want to spend that much time on it.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
OK, I'll take your word for it :)
(But why is it that the connection between the CC and LMS is broken when the tab is closed on the PC?)
Or, to be more precise; Is there a way to avoid that?
Or, to be even more precise (I'm going in circles now, aren't I?); Is there a way to enter a URL into the browser inside the CC?

(Let me know when you've had enough of this :)
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
OK, I'll take your word for it :)
(But why is it that the connection between the CC and LMS is broken when the tab is closed on the PC?)
Or, to be more precise; Is there a way to avoid that?
Or, to be even more precise (I'm going in circles now, aren't I?); Is there a way to enter a URL into the browser inside the CC?

(Let me know when you've had enough of this :)
I guess to should have explained it a bit better. When you cast a tab, the Chrome browser is telling the CC to run some sort of default app. It then sends that app the url to the site in the tab. The app then connects to the site and displays it. You can basically think of it as the core browser of the CC is running a browser app within itself.

So even though CC is directly connected to the site of the URL, the CC is still technically running an app and apps require an active connection to continue running. When the tab is closed, that connection is broken and the app on the CC is closed.

This is how the CC is designed to work, which makes sense since the CC is supposed to be a device shared by anything on the same network that supports it. Whenever there is no longer a connection to an app on the CC, it automatically closes it.

I think that app that you mentioned Dashboard Cast doesn't really close when you hide it, it keeps a background service running to keep the connection open. I read the description of the app and it requires the permission to prevent the phone from sleep stating that "if the phone sleeps while connected to the Chromecast, the connection is interupted. Therefore the application needs to prevent the CPU from going to sleep in order to keep the connection open." I think this supports my theory that it has to keep a background service running to keep the CC app from closing.

In other words, there is no way to keep an app running on the Chromecast without an application running on another device to keep an open connection with the CC.

And no, I do not know of anyway to enter a URL directly into the browser of the Chromecast without the use of an application.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
Thanks for your reply.
Just for your information - Whatever it is that the Dashboard app loads into the CC, the CC continues to play and update all widgets even after I shut down the phone where the app is installed. This indicates to me that your assumption that an App running in background is needed to keep the CC running.
I think the reason why the CC stops immediately with the Casting feature of the Chrome Browser when the browser is closed, is because it use RTC and not Javascript or URL.
Would you agree?
 

wayne@angrygoat

Active member
Sep 18, 2012
29
0
1
Visit site
Thanks for your reply.
Just for your information - Whatever it is that the Dashboard app loads into the CC, the CC continues to play and update all widgets even after I shut down the phone where the app is installed. This indicates to me that your assumption that an App running in background is needed to keep the CC running.
I think the reason why the CC stops immediately with the Casting feature of the Chrome Browser when the browser is closed, is because it use RTC and not Javascript or URL.
Would you agree?

I'm not sure what you mean by RTC, that's not a term I recognize in this context.

I took a closer look at how the Squeeze Ctrl CC app handles device disconnection and it turns out that I'm wrong. The javascript app is responsible for closing itself when there is nothing connected to it. That part of the app is boilerplate code provided by Google, so I didn't really look at it as long as it worked.

The CC stops immediately after the Chrome Browser closes because the CC app that displays links from the Chrome Browser is designed to close after the browser disconnects.
 

VikingOy

New member
May 10, 2014
2
0
1
Visit site
By RTC I just mean Real-Time-Communication. Meaning that there is a constant chit-chat between the browser and the CC - which you too essentially pointed out.
But that brings me back to square one again - The Dashboard Cast App proves that the CC is truly self contained enough to be able to run a script (or code) after initial load - indefinitely, until interrupted.
All I want to have, is an App that allows me to load such code into the CC using a friendly GUI.

:)
 

bwaldron

Member
Apr 10, 2010
14
0
0
Visit site
I'm having a problem with 1.7.1: when browsing My Music > Artists, I get nothing --where I should see a list of albums for the artist. Other browsing of my library (e.g., the Albums menu) works as expected. Just sideloaded a saved copy of 1.7.0 and it works fine, so it is something that changed in the most recent app update.

Sent from my SM-T900 using Tapatalk
 

Trending Posts

Forum statistics

Threads
943,195
Messages
6,917,731
Members
3,158,870
Latest member
RandyRoyalty