sarbagyastha / youtube_player_flutter

A Flutter plugin for inline playback or streaming of YouTube videos using the official iFrame Player API.
https://youtube.sarbagyastha.com.np
BSD 3-Clause "New" or "Revised" License
693 stars 787 forks source link

[FEATURE REQUEST] Flag to prevent download or streaming of videos on start #903

Open jvenki opened 8 months ago

jvenki commented 8 months ago

Is your feature request related to a problem? Please describe. Even though there is a flag to disable autoPlay, I believe the video is gettig downloaded in the background. I have 100s of videos rendered on a screen and the view becomes unresponsive at start. Is there a way I prevent download of videos till they are PLAYED.

Describe the solution you'd like I would like a flag to control this behaviour of downloading videos. It makes sense when there is only 1 video that we are downloading and keeping it ready. Not really required when the page has many videos. Therefore I would recommend having a flag to disable download just like autoPlay.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context I did come across https://github.com/sarbagyastha/youtube_player_flutter/issues/569, but not sure how to use it.

jvenki commented 8 months ago

Is the expectation that we have to invoke YoutubePlayer.getThumbnail without building YoutubePlayer. On click on the image, we then insert the YoutubePlayer into the widget tree?