-
Notifications
You must be signed in to change notification settings - Fork 822
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
[BUG] Video stops playing after scroll in ListView #174
Comments
I would guess this is happening because flutter reuses widgets in a |
You're right, as very ugly walkaround i replace player with empty container and call reset on controller when user scrolls down and putting new player and seeking to last position when user scrolls back. |
I guess you're using ListView.builder, which is recycling and building on demand. Maybe you can achieve what you want by using a simple ListView, but keep in mind this is only viable on small lists... |
I was able to fix it by wrapping the list item that contains the YT player in a stateful widget with
Usage
|
Describe the bug
I had an YoutubePlayer in ListView. When i scroll down to the point when player is no longer visible, it stops the playback, listener stop working and i get this log messages:
After scrolling down
On Android:
On iOS:
nothing
After scrolling up
On Android:
On iOS:
My code:
Widget:
Controller initialization in notifier:
Technical Details:
The text was updated successfully, but these errors were encountered: