Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromecast #869

Open
iamdriz opened this issue Nov 26, 2014 · 15 comments
Open

Chromecast #869

iamdriz opened this issue Nov 26, 2014 · 15 comments

Comments

@iamdriz
Copy link

iamdriz commented Nov 26, 2014

Would it be possible to use Chromecast with an atom-shell app? Bearing in mind that atom-shell uses the same underpinnings as Chrome...

@iamdriz
Copy link
Author

iamdriz commented Nov 26, 2014

I've seen some stuff like:

http://www.roguesavant.com/bigscreen/
and
https://github.com/thibauts/node-castv2-client

So it seems like it's perfectly possible.

@zcbenz
Copy link
Member

zcbenz commented Nov 28, 2014

It is possible to support Chromecast, but it also needs lots of work, so I don't think I will ever work on this unless there are very popular requests.

@bwin
Copy link
Contributor

bwin commented Nov 28, 2014

Bigscreen is based on node-webkit. They don't support it either AFAIK. see nwjs/nw.js#1783

You already mentioned https://github.com/thibauts/node-castv2-client
As far as I can see, all you need is node. You got node in both projects (node-webkit and atom-shell) so give it a try. (I don't have a chromecast, so I can't test it.)

edit:
Overlooked it at first, but Bigscreen is using thibauts/node-castv2-client.

So it seems like it's perfectly possible.

Agreed.

edit (again): Also IMHO this wouldn't fit in atom-shell, so a 3rd-party-module is fine for this.

@zcbenz
Copy link
Member

zcbenz commented Dec 7, 2014

Finally I think we should not have built-in support of this in atom-shell, because it can be implemented purely outside atom-shell and supporting it would add significant maintenance work.

@zcbenz zcbenz closed this as completed Dec 7, 2014
@MarshallOfSound
Copy link
Member

Just thought I'd put this here for history's sake.

This module, https://github.com/GPMDP/electron-chromecast is an initial implementation of the official chrome.cast API as found in Chrome but in Electron.

It mirrors the Chrome API and is a drop in replacement. For instance, we use it to get Chromecast functionality on Google Play Music.

@iamdriz
Copy link
Author

iamdriz commented May 5, 2016

@MarshallOfSound Do you have any documentation for how this is used? e.g. adding it to an Electron application, etc.

@MarshallOfSound
Copy link
Member

@iamdriz I still need to write that up in the README, but basic usage is this. This must be done inside the renderer process

require('electron-chromecast')((receivers) => {
    return new Promise((resolve, reject) => {
        resolve(receivers[0]);
    });
});

The module returns a function that you call with a single parameter. This parameter should be a function that accepts a parameter receivers which is an array of Receiver objects.

This method will be called as part of the standard process of calling chrome.cast.requestSession(). It will be called with all available receivers and you must resolve it with the one you want to connect to.

Other than that one function you need to implement the entire usage process is identical to the chrome.cast API

@zcbenz
Copy link
Member

zcbenz commented May 30, 2017

I'm reopening this issue since there are lots of requests of it, but it doesn't not indicate we are going to work it.

@johndevedu
Copy link

johndevedu commented May 16, 2018

I do a lot of casting to share my vscode screen with my team. Since vscode is built on electron, it would be awesome for this feature, so either vscode can have it built in, or a vscode extension can be built to enable this. Thanks!

@0xENDER
Copy link

0xENDER commented Oct 7, 2020

What is the current status of the Chromecast implementation plans?

@oliexe
Copy link

oliexe commented Jan 22, 2021

Any update on this ? heavily interested to cast the renderer window

@m4heshd
Copy link

m4heshd commented Jul 14, 2021

+1 This feature is much needed. Want the users of my application to be able to cast a child window created by the app. Any chance on bringing chrome tab casting functionality down to Electron?

@adammpkins
Copy link

adammpkins commented Jul 12, 2022

+1 for this feature. MarshallOfSound has been the only person on this 8 year old request who "implemented purely outside atom-shell" and he has stated in issue 7024 that electron-chromecast is hacky and not a proper implementation of the functionality. Please reconsider building this into electron as opposed to relying on an external implementation. After all, it is native functionality in Chromium and should be natively available from Electron.

Most electron projects I've encountered seem stumped on how to implement this themselves, and rightly so. It's an unsolved issue in this ecosystem that would open a lot of doors.

@coreybruce
Copy link

Is there any progress in this? I would love to implement cast for my Youtube Music desktop app

@RealAlphabet

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests