Youtube_player_flutter: Issues with the example app

Created on 12 Jul 2020  路  7Comments  路  Source: sarbagyastha/youtube_player_flutter

Hello , thanks for the awesome plugin. There is a problem with the example app of the new youtube player iframe if you load any private videos like https://youtu.be/vXlhzk3XPug and then click watch on YouTube it plays YouTube within the player screen and doesn't redirects. Also if you click on share on a video if it's playing it breaks the player and starts showing YouTube website within it.

1) If it's possible to implement an api varient of the same , I would be more than happy to contribute.* Like if the key parameter is null use iframe else use api. As it would fill both the use cases or *if the video is private use api varient

All 7 comments

@itssidhere What do you mean by Api varient ?

@sarbagyastha Which plays the video by using the api key so that we can watch the videos which aren't supported in the embedded player

But there's no way to use API key. It's out of scope for this package as the one that requires API key for playback is the Youtube Android Player API.

For the issue you mentioned, you can listen to error and add a barrier overlay on top of the player. That's the beauty of the new package, as it exposes all the necessary APIs to build your own player.

I understand it's out of scope but it will be much more packed when implemented with the api as due to the embedded limitation it doesn't fits in every use case. Overall it's the best package but this embedded restrictions are limiting it

Something like this package which uses api but isn't as useful as your package.

https://pub.dev/packages/flutter_youtube

Just a suggestion and I would be more than happy to contribute if we start working on it

Hmm.. but that would only help in Android platform, as other platform has no options other than embedding.

Also i guess there are limitations while using API key based player too.

  • Like we cannot draw anything over it.
  • It requires Youtube Player to be installed.
  • And it's restricted to using only one player per page.

We could implement as per your suggestion, but it will only be a solution for Android, that's my biggest concern. What's your though on this ?

@sarbagyastha I agree upon the limitations part but this should be implemented even if it's just for android. It will wrap up every use case. Like if the api key is not null and the platform is Android check.

Also, this plugin manages to play it on ios too (https://pub.dev/packages/flutter_youtube) so I think its worth including API variant too as I saw some people migrating to this plugin because of private videos, and this plugin does nothing except playing the video, does not provide any controls as your plugin

Hmm.. but that would only help in Android platform, as other platform has no options other than embedding.

Also i guess there are limitations while using API key based player too.

  • Like we cannot draw anything over it.
  • It requires Youtube Player to be installed.
  • And it's restricted to using only one player per page.

We could implement as per your suggestion, but it will only be a solution for Android, that's my biggest concern. What's your though on this ?

Is using the iFrame API without an API key instead of the Android Player API allowed by YouTube?

Was this page helpful?
0 / 5 - 0 ratings