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

How for Youtube Playlists Make autoplay and redirect it to Native Installed YouTube App #1100

Open
pooya-mohammadhossein opened this issue Jan 23, 2024 · 0 comments
Labels

Comments

@pooya-mohammadhossein
Copy link

pooya-mohammadhossein commented Jan 23, 2024

@PierfrancescoSoffritti

I have managed to use this library to play both YouTube videos and playlists with Google TV Chromecast (Android 14), but I have one critical issue. How can I enable autoplay for YouTube playlists and redirect them to the native installed YouTube app? P.S. When I disable autoplay by setting it to zero, it redirects to the YouTube native installed application. However, when I enable autoplay and set it to 1, autoplay works but it stays on the web view. Could someone please kindly let me know how I can have autoplay enabled and redirect playlists to the native YouTube installed app? Please consider that Users your library in Android use Different devices , I mean I am using it in Google Tv and it should be user and remote control friendly too. Thanks.

      IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
          .controls(1)
          .autoplay(1)
         .listType("playlist")
          .list(PLAYLIST_ID)
          .build();
      getLifecycle().addObserver(youTubePlayerView);
      youTubePlayerView.initialize(youtubePlayerListener, true, iFramePlayerOptions);

Kindest Regards,
Sincerely

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

No branches or pull requests

1 participant