Description
Hello,
when using fullScreenByDefault
the playback does not start in full screen if autoPlay
is enabled
Worse, the controller still thinks it is in full screen so it displays the wrong control icons and toggle.
This can be reproduced easily with the sample code by enabling the fullScreenByDefault
option :
I investigated and the way fullScreenByDefault
and here is what I could find :
During controller init, if autoPlay
is enabled we try to go manually to full screen.
But the widget is not created yet, since it need the controller...which is still initializing.
The boolean _isFullScreen
stays on true despite the failed attempt and prevents the future actions to go through.
At the end of the controller init, a listener is registered with the videoPlayerController
so it can wait for the right time before going full screen. And this listener will stay on forever because of the boolean preventing him from doing his job and self destroying.
I've prepared a fix and will push it as a PR but I wanted to document my findings to simplify the review and launch the discussion.