Skip to content

fullScreenByDefault does not work with autoPlay #710

Open
@maxbritto

Description

@maxbritto

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 :
chewie-autoplay-fullscreen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions