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? #52

Closed
gossi opened this issue Jul 17, 2017 · 5 comments
Closed

Chromecast? #52

gossi opened this issue Jul 17, 2017 · 5 comments

Comments

@gossi
Copy link

gossi commented Jul 17, 2017

Hey guys,

I am really impressed by your library and might consider using it. I was wondering, if - mostly technically spoken - the rendered video (as it is put on canvas) can be transmitted to chromecast?

Answer: Yes, it is possible. See comment below.

thanks

@emshotton
Copy link
Contributor

Hi @gossi, thanks for the kind words!

I haven't tried, but i expect it might not work. The problem is the VideoContext needs to be able to decode multiple video files, and i think (but I'm not 100% sure) that the chromecast will only handle a single video stream at a time.

A workaround could be to cast the entire tab from chrome browser. But depending on your desired application that might not be appropriate.

@gossi
Copy link
Author

gossi commented Jul 17, 2017

I've only played a little with chromecast so far. When setting up a connection to a chromecast, you load up a receiver application onto it and the default one, will take a single video stream as you already point out.

However, since playing games via chromecast is possible, it might also be possible to stream the canvas over to the chromecast using the games API, if that's what they call it (iirc).

Since I recently saw the video of your jsconf talk and I was wondering if I understand you correctly (and as a bigger part of the bbc mission statement) this project is kinda like the progressive enhancement for video (with activateable layers), where I thought sending the output to a cast (or other receiver) might possibly included in this goal ;)

@gossi
Copy link
Author

gossi commented Jul 27, 2017

I did some quick research and as far as I found out, it is possible to cast canvas to chromecast. Simply spoken:

  1. Get the stream of the canvas and put it into a <video> element.
  2. Get the current source url of the video element and cast it onto the chromecast
  3. Write a custom receiver, that is able to "read" the freshly generated source url (= put it onto a <video> element)

References:

@emshotton
Copy link
Contributor

hey @gossi
Thanks for researching that! It definitely looks achievable, and would be really interesting to try.

I'm not sure at the moment how much new functionality needs to be added to support this in the VideoContext as it sounds like it might "just-work" in conjunction with that cast-canvas project as the VideoContext just renders to a standard canvas.

If i get a bit of time I'll look into adding an example to the VideoContext docs.

@gossi
Copy link
Author

gossi commented Jul 28, 2017

My question is answered and also people will find the answer here, which is great. I'll close it and put up the answer in the first post.

@gossi gossi closed this as completed Jul 28, 2017
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

2 participants