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

Continue PlayList from the last seen unless there is a new video on PlayList #1102

Open
pooya-mohammadhossein opened this issue Jan 25, 2024 · 4 comments

Comments

@pooya-mohammadhossein
Copy link

pooya-mohammadhossein commented Jan 25, 2024

@PierfrancescoSoffritti
First of all, thank you for your great work. I was wondering if I could suggest that you add a new feature request to your library.

The feature I would like to suggest is the ability to continue a playlist from the last seen video, unless there is a new video added to the playlist. In that case, the latest video would be shown.

The reason for this suggestion is that if you have a large playlist, like one with 100 videos, currently, unfortunately, if you want to continue watching from the last video you have seen, you have to start from the beginning each time, which is not really convenient.

I highly recommend adding this new feature as an optional setting. You could name it however you want (I suggest "ContinueFromLastWatched").

Thanks again for your great work, and please keep it up!

 IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
          .controls(1)
          .ContinueFromLastWatched(1)
....
@PierfrancescoSoffritti
Copy link
Owner

Thanks for the suggestion, do you know if there is a way to do this with the IFrame Player?

@pooya-mohammadhossein
Copy link
Author

pooya-mohammadhossein commented Jan 28, 2024

@PierfrancescoSoffritti Thanks for your answer. I am not aware of that. please kindly share a Sample code to how to do it in Java? Thanks. Sincerely,
Kindest Regards.

@pooya-mohammadhossein
Copy link
Author

pooya-mohammadhossein commented Feb 7, 2024

@PierfrancescoSoffritti I have just managed myself to integrated and transfer my App to the most recent Media3 (1.3.0-alpha) Library. as you know better than me Iframe Player Api For Android has completely Deprecated (mean this link https://developers.google.com/youtube/android/player) So I will appreciate if once Released you could send sample code to how add it to your library I mean this one (https://github.com/PierfrancescoSoffritti). My main goal is develop my app (which is including iPTV , Youtube Link And Youtube Playlists) for my parents that while they are playing a Youtube Playlist via your library , they could easily redirect to the Native Youtube Application that they could easily Work With Google Tv 4k Chrome cast.
Please keep on great works. All The Best, Sincerely,
Kindest Regards,
Pooya M

@pooya-mohammadhossein
Copy link
Author

pooya-mohammadhossein commented Mar 27, 2024

@PierfrancescoSoffritti
Great work on your library! I highly recommend you to buy this device (which is less than 50$ ) and it's perfectly updated and supported by Google Company.

I'm using it in my app on Google TV 4K Chromecast (Android TV) to play YouTube videos. This device is highly recommended (under $50) and fully supported by Google.

I found a helpful workaround to redirect users from my app (using your library for playback) to the native YouTube app:

Configure your Java code as usual (see PS 1 below).
On the Google TV remote, press Home to minimize your app and send your library to the background.
Return to your app using your library.
When you see the YouTube timeline, press down on the remote key and then Enter. This will redirect playback from your library to the native YouTube app.
Feel free to ask if I can further assist or address any concerns. I'd love to hear your thoughts on this workaround and if it could be implemented as an optional setting for easier redirection on Google TV 4K Chromecast. Thanks in advance. Sincerely,
Kindest Regards,
Pooya M
Pooya Mohammadhossein
P.S 1 : I have set following Configuration with your library on my Application (written in Java code) :

IFramePlayerOptions iFramePlayerOptions = new IFramePlayerOptions.Builder()
          .controls(1)
          .autoplay(1)
          .listType("playlist")
          .list(PLAYLIST_ID)
          //FixedByMe Pooya FixedMe Check these Some of them might not Necessary just verify if it works as expected
          .ivLoadPolicy(1)
//          .ccLoadPolicy(0)
          //Fixed by ME Pooya Tv, following parameter should be zero in order the banner in top right bottom corner
          // Not be out of scope.
          .fullscreen(0)
          .mute(0)
//  (this is not Necessary to hide the Youtube button         .modestBranding(1)
          .origin("https://www.youtube.com")
          //FixedByMe Pooya FixedMe Check these
          .rel(0)
          .build();
      getLifecycle().addObserver(youTubePlayerView);
      youTubePlayerView.initialize(youtubePlayerListener, true, iFramePlayerOptions);

P.S 2 : (You could buy Google Tv for less than 50$ from Google Website : here is the link to buy https://store.google.com/us/config/chromecast_google_tv?hl=en-US&selections=eyJwcm9kdWN0RmFtaWx5IjoiWTJoeWIyMWxZMkZ6ZEY5bmIyOW5iR1ZmZEhZPSIsImhlcm9Qcm9kdWN0cyI6W1siY0hKa1h6YzRNekpmTXprMU1nPT0iLDEsbnVsbF1dfQ%3D%3D

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