Jump to content

Chromecast via WebApp (NOT Browser)


Qowy

Recommended Posts

Hi,

are there any plans to support controlling chromecast playback from the webapp?

I don't mean to use chromes ability to cast via the browser, but instead via the cast icon on the website (that for example supports DLNA).

This should be possible (I've implemented something like this myself once with the help of a Library like this https://github.com/kakone/GoogleCast)

This would enable all browsers including for example firefox to cast to speaker groups. And it could (if so desired) allow to remote control chrome casting from another Browser with the same logged in user account.

Also it would free the client device from having to actively monitor the chromecast connection (since the server would basically do all the work)

Edited by Qowy
Link to comment
Share on other sites

Hi, the downside is we'd have to put this into the server, which means it would only work with Chromecast devices on the same network as the server itself.

Link to comment
Share on other sites

1 minute ago, Qowy said:

Correct, but so does DLNA does it not?

Yes, but we don't want it to be that way forever. It would be much  more powerful to move the feature to the apps so that it can work on any network.

Link to comment
Share on other sites

Given that Edge is based on Chromium now, that means this would mainly target Firefox and Safari. Is it worth such a big change for that? Personally I don't think so.

I saw on github a firefox extension you can install that will mimic google cast support which allows it to work with web apps that support Chromecast. You'll have to forgive me though because I can't find it right now. But just a few weeks ago a user mentioned they were using it in Firefox with the Emby web app.

Link to comment
Share on other sites

Ok, I can understand that.

Then maybe I need to rephrase the question:

Lets say I have a server (not neccesarily the emby server just some permanentely active client)
I can open edge on it and stream music to a Chromecast group.

After minutes/hours I want to pickup any device/phone on the Home and skip a song.
I cannot use my phone connect to the chromecast and adjust something since this will stop playback.

What I can do is connect to the browser EmbyWeb instance and remotecontrol it, right? But this seems to be very inconsistent.

 

Currently I have open: Firefox Chrome Edge with emby web each.

Android only sees the Chrome instance to control
Edge is seeing the Chrome instance

Chrome sees nothing, so does firefox :D

 

And if I use Remote control nothing is displayed but play pause works

 

(I can see my kodi etc devices just fine in all of them of course)

 

Edit:

So to clarify what seems to missing is the functionality to remote control a chromecasting Browser.

I hope you can see why I would find a feature useful where the Server is streaming centrally and controlled by all the clients.
But I can understand, that is not how emby usually operates, but then proper remote controlling of a Casting Browser instance would be nice (and achieve the same effect)

Edited by Qowy
Link to comment
Share on other sites

Another problem with the Edge /Chrome implementation seems to be that after an automatic song change the controls are no longer doing anything/displaying the current tim in the song.

Link to comment
Share on other sites

Ideally you would use a browser that allows you to control the Chromecast directly rather than go through the layer on controlling the remote control app.

Remote control of another emby app is accomplished via a web socket connection from browser to server.

If you leave a browser idle on a machine for long periods of time, the browser will close the socket connection eventually and then it won't be remote controllably anymore.

Link to comment
Share on other sites

3 minutes ago, Qowy said:

Another problem with the Edge /Chrome implementation seems to be that after an automatic song change the controls are no longer doing anything/displaying the current tim in the song.

Ok that's an issue we can look at resolving. Thanks.

Link to comment
Share on other sites

10 minutes ago, Luke said:

Ideally you would use a browser that allows you to control the Chromecast directly rather than go through the layer on controlling the remote control app.

Remote control of another emby app is accomplished via a web socket connection from browser to server.

If you leave a browser idle on a machine for long periods of time, the browser will close the socket connection eventually and then it won't be remote controllably anymore.

I am not sure I understand. The problem is that I (seemingly?) cannot gracefully take over control over a chromecast with emby.
When I open a second Chrome for the same Cast Device My current Play state is reset.

 

EDIT:

Ok I tested this further:
-Browser playing -> opening android app and controlling chromecast works

-browser playing -> opening browser on different pc I can see that emby is casting to this device, but no option to "connect" embyweb to it (like in the android version) So is this not implemented yet?

 

Keep alive pings exist ;) (at least for desktop browsers)

10 minutes ago, Luke said:

Ok that's an issue we can look at resolving. Thanks.

Console if I click for example on play after that:

image.png.23d5b4bf45d2341610b702980e4dd8ae.png

Edited by Qowy
Link to comment
Share on other sites

You have helped insofar, that I rethought my approach to remotely controlling chromecast devices.

You are right, that the best method is probably to directly control the chromecast device with each emby app.

As said before this works fine for the android app, but I cannot seem to connect to a currently casting device via the web app. The only option is to stop casting, and then reconnect.

image.png.8004113c78dcee83a34aeb05fab59ac4.pngimage.png.b00c5e2fa99f82ba6cbbf333a1443893.png

 

But clicking that blue device only results in a stop casting command.

Link to comment
Share on other sites

  • 2 weeks later...

Yea I've noticed recently that connecting to Chromecast from the web app restarts the whole receiver but not with the android or iOS apps. I don't necessarily think this happened due to any change of our own, but we'll see if we can figure out why. Thanks for reporting.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Not being able to take over playback with a browser still happens. But that seems like a browser problem unless you can circumvent the Browser Cast dialog (like on android)

The Presentation Connection is disconnected DOMException still happens, controls are unresponsive after a Track change. (or it just disconnects alltogether and the now playing interface disappears while music keeps playing. But that part yould be a chromecast issue and beyond of the scope of emby to control, since I see no error Message)

 

Hm weird now I tried another Chromecast device, and it worked fine. So I would mark it fixed for the moment and see if the issue crops up again. (That is the Exception issue, Controlling running music is still out)

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...