Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

How to Cast Youtube Video using Casty? #5

Open
SopMar opened this issue Aug 10, 2017 · 2 comments
Open

How to Cast Youtube Video using Casty? #5

SopMar opened this issue Aug 10, 2017 · 2 comments
Labels

Comments

@SopMar
Copy link

SopMar commented Aug 10, 2017

I found Casty during my search, I have a question, what If I would like to cast Youtube Video using Casty lib.

Here is the link of sample code, I am using to play Youtube video using API within my App... I want to cast same.

I believe it's not gonna take much time for you, so can you please write a separate method to cast Youtube Video in your MainActivity.java class. (I'm afraid, in this case we have Play/Pause already :) )

Can we use something like this, to work with Youtube videos:
return new MediaData.Builder("https://www.youtube.com/watch?v=RKjUPQCXnsM")

Shall we need to keep other variables same as you kept in createSampleMediaData() method and what are the areas where we need to make changes in our code... (in existing class)

@koral-- koral-- changed the title How to Cast Youtube Video using Casty How to Cast Youtube Video using Casty? Aug 10, 2017
@burnoo
Copy link
Contributor

burnoo commented Aug 14, 2017

To play Youtube video in Casty (or Google Cast v3), you will need a direct video URL - so you have to use another YouTube API -> Data API

@SopMar
Copy link
Author

SopMar commented Aug 14, 2017

I've asked, check this Stackoverflow link - https://stackoverflow.com/questions/45684260/cast-video-to-tv-using-mediaroutebutton

Assume I am already familiar with YouTube API... and I have YouTube Video URL too, like this one: https://www.youtube.com/watch?v=RKjUPQCXnsM

So my main concern is. Is it possible to cast YouTube Video... if yes so do we really require play / pause button separately to play and stop video like we are doing in existing case, and is the way our youtube video url should look like:

return new MediaData.Builder("https://www.youtube.com/watch?v=RKjUPQCXnsM")

Actually, I don't have things required to test casting like Chromecast... that's why I can't test at my end...
But I shared what I am assuming... can you confirm it once...

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

No branches or pull requests

3 participants