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

enable communication with reciever #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PabloDons
Copy link

This will enable a custom sender using this app ID to communicate with the website if this website supports it.
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

I might write a way for the receiver website to communicate with the sender too.

This will enable a custom sender using this app ID to communicate with the website if this website supports it.
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

I might write a way for the receiver website to communicate with the sender too.
@normanr
Copy link

normanr commented Mar 31, 2020

What's your use case for this? Do you have an example of a website that allows messages from any origin?

@PabloDons
Copy link
Author

PabloDons commented Mar 31, 2020

I'm pretty sure I was trying to make a sort of remote desktop application for Chromecast so I could browse to web videos I couldn't get a direct link to. I was extremely dissatisfied with casting a chrome tab clearly. The origin wildcard is probably me who didn't really understand what I was doing

@normanr
Copy link

normanr commented Apr 3, 2020

heh. I was thinking that once you've added support for postMessage and/or the message event handler that it might just be simpler to get a dedicated appId and use the cast API instead.

I think it's easier to cast videos these days (many inline players have cast support), but yes I agree: those without are annoying. Unfortunately due to cross-origin safety it's not possible to remote control a page once it's loaded, which is often required to start the video

@PabloDons
Copy link
Author

I was also very much against paying for an appid for some reason. Dunno, it was 3 years ago. But I was pretty much only doing this to use KissAnime and I have better ways to watch anime now. Strange how inspiration works.

Too bad with the origins thing though, my idea of remote browser could actually have been quite interesting

@normanr
Copy link

normanr commented Aug 22, 2020

btw, this should be possible to do without using the Chromecast specific API today with the Presentation API instead. Demos:

@cashpipeplusplus
Copy link

You would think so, but the Presentation API, as implemented in Chrome, creates a hidden tab and the streams a video capture of that tab to the Chromecast. It doesn't actually load the page on the Chromecast itself.

That's fine if all you want to do is show something on the screen, but if you need to, for example, test JavaScript or HTML or CSS on the actual Chromecast device before shipping a product, the Presentation API isn't that.

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

Successfully merging this pull request may close these issues.

3 participants