-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
[video_player plugin]: Handle multiple calls to initialize better. #25738
Comments
to my best knowledge flutter/plugins#613 is the last known progress in this direction. Please look into this. |
An amusing bug at least? 😭 @amirh would know the severity or complexity here. |
@eseidelGoogle @amirh do we have any progress on this? I don't want to have to resort to writing platform channels for something that should be possible with this plugin. 😝 but I have less than 10 days to deliver. Please help |
The example code is calling |
oO my bad. |
The solution by @jason-simmons worked |
I'm keeping this open as we should probably deal better with double initialization (either crash or ignore it) |
How did you solution this issue? @raveesh-me |
floatingActionButton: FloatingActionButton(onPressed: () {
_controller.initialize();
_controller.play();
}), change this to floatingActionButton: FloatingActionButton(onPressed: () {
_controller.play();
}), and everything else works. |
ok,thank you very much! |
Please, just bulletproof the player initialization to be executed a single time and report the 'problem' in the debug output stream. That should make the cut. Or ... at least add bold comment in the player source code about this 'initialization mechanism that cannot be called two times' because right now there is nothing about it.
I searched with the symptom description and found nothing for a month... until today by chance. Nothing to be ashamed of as this is arguably a 'booby trapped' api. Thanks for reporting and the solution. |
Steps to Reproduce
videoplayer example:
code sample
video stream url: https://s3.ap-south-1.amazonaws.com/mastermentorsteststack-destination-fr9w5wh3t94i/db3dde26-6f40-4634-8762-6d643a65c800/hls/1+-+Introducing+AWS+Cloud9+-+AWS+Online+Tech+Talks.m3u8
result:
https://www.youtube.com/embed/3v5V1UFyywI
The video_player is playing all the streams at once :(
Logs
logs
flutter doctor -v
The text was updated successfully, but these errors were encountered: