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

Video unavailable #2

Open
walkerreynolds16 opened this issue Mar 16, 2019 · 7 comments
Open

Video unavailable #2

walkerreynolds16 opened this issue Mar 16, 2019 · 7 comments

Comments

@walkerreynolds16
Copy link

I have gotten my app working pretty well, but whenever I try to play a music video or a video for a song, It only shows "Video Unavailable". I know YouTube is picky about playing certain videos, mainly music videos, in an embedded form, but I was able to play most of these videos on a simple site with a YouTube Iframe in it. I'm not sure if you have any input on this, but any feedback would be great since this problem pretty much breaks how I want to use my app.

Thanks

@Fleker
Copy link
Contributor

Fleker commented Mar 18, 2019

Music videos in particular end up getting limited a lot when being embedded. As this project uses the same principles as the iframe, I'm unsure why it would be different on a website compared to this.

@walkerreynolds16
Copy link
Author

I'm not sure why it's different than a website either. I'm still doing some research on what could fix it. I'll try to give an update when I find something.

@walkerreynolds16
Copy link
Author

OK I have a theory for why it might not be working. When you setup the YouTube URL in loadVideo() of YouTubePlayerView, an origin is not being set in the URL. I'm guessing if no origin is stated, YouTube gets really picky with what videos it shows, mainly videos that are owned by music groups.

This is just a thought, but it could be changed to allow specifying an origin, that may help.
https://developers.google.com/youtube/player_parameters#origin

@Fleker
Copy link
Contributor

Fleker commented Mar 18, 2019

Is there a domain this works with directly, or should it be a parameter that one can set?

@walkerreynolds16
Copy link
Author

I saw somewhere online where they just put www.youtube.com and they said that worked, but I feel like this is somehow against one of their policies. I would make it a parameter that can set which defaults to no origin or youtube.com.

@Fleker Fleker self-assigned this Mar 18, 2019
@walkerreynolds16
Copy link
Author

So after more testing and changing around the library code, it seems that setting the origin in the URL does not help my issue. While I think this is still a good thing to have in the project, It will not help me.

Right now, I think the issue is something else in the chain of showing the video. I was able to make a static website hosted here that, I'm guessing approximates how the webview is showing the YouTube player. On the webpage, the video plays without any errors, but when played on my app, it does not.

Does this player use an Iframe for the webview? If it doesn't, it could be the reason why some of the videos aren't loading. If you go the direct link of the embed player, the video will not play.

@Fleker
Copy link
Contributor

Fleker commented Mar 25, 2019

Yes, this project used the /embed/ version of the YouTube link directly

@Fleker Fleker removed their assignment Jan 14, 2022
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

No branches or pull requests

2 participants