Skip to content

[video_player] Add Fullscreen for Web #64397

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

Closed
Bilonik opened this issue Aug 22, 2020 · 9 comments · Fixed by flutter/packages#6990
Closed

[video_player] Add Fullscreen for Web #64397

Bilonik opened this issue Aug 22, 2020 · 9 comments · Fixed by flutter/packages#6990
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter p: video_player The Video Player plugin P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels. platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@Bilonik
Copy link

Bilonik commented Aug 22, 2020

Add Fullscreen for Web

@darshankawar darshankawar added p: first party p: video_player The Video Player plugin platform-web Web applications specifically c: proposal A detailed proposal for a change to Flutter labels Aug 24, 2020
@ferhatb
Copy link
Contributor

ferhatb commented Aug 27, 2020

/cc @ditman

@ferhatb ferhatb added the assigned for triage issue is assigned to a domain expert for further triage label Aug 27, 2020
@ditman
Copy link
Member

ditman commented Aug 27, 2020

This feature is not available in any of the platforms, according to this:

#58114

@ditman ditman added P3 Issues that are less important to the Flutter project c: new feature Nothing broken; request for a new capability labels Aug 27, 2020
@ditman ditman removed their assignment Aug 27, 2020
@Bilonik
Copy link
Author

Bilonik commented Aug 27, 2020

@ditman if I change the parameter to make controls = true fullscreen works great.

video_player_web.dart line 157
videoElement = VideoElement()
..src = uri
..autoplay = false
..controls = true
..style.border = 'none';

@ditman
Copy link
Member

ditman commented Aug 27, 2020

@Bilonik I understand that that can be done, however, the plugin needs to run consistently across all platforms. (Ideally we should think on how to add the full screen feature to all platforms, that's why I linked the global issue)

@sondresorbye
Copy link

This works for web, but not the other platforms, right?

@sondresorbye
Copy link

Any updates?

@JiangJuHong

This comment was marked as duplicate.

@michalkubizna
Copy link

michalkubizna commented Jan 13, 2023

@ditman I believe this feature should only be available on the web, as developers may want to include custom transitions and animations on other platforms, but that is not possible on the web due to restrictions in browsers like Apple's WebKit. Additionally, the web is currently the only platform where packages built on top of video players cannot utilize the fullscreen functionality, as the VideoElement implementation is hidden.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2024
zhouyuanbo pushed a commit to zhouyuanbo/video_player_2.9.3 that referenced this issue Mar 14, 2025
Exports types `VideoPlayerWebOptions` and `VideoPlayerWebOptionsControls` to customize the `webOptions` field in `VideoPlayerOptions` objects.

Forwards `webOptions` to the web implementation.

## Usage

Can be used as follows:

```dart
_controller = VideoPlayerController.asset(
  'assets/Butterfly-209.mp4',
  videoPlayerOptions: const VideoPlayerOptions(
    webOptions: VideoPlayerWebOptions(
        controls: VideoPlayerWebOptionsControls.enabled(
          allowDownload: false,
          allowFullscreen: false,
          allowPlaybackRate: false,
          allowPictureInPicture: false,
        ),
        allowContextMenu: false,
        allowRemotePlayback: false,
     ),
  ),
);
```

<img width="967" alt="Bildschirmfoto 2023-07-06 um 17 04 59" src="https://github.com/flutter/packages/assets/13286425/0fa92713-11cb-4073-86cf-2ea4ba486a6c">

## Issues

* Fixes: flutter/flutter#150327
* Fixes: flutter/flutter#64397
* Fixes: flutter/flutter#62192
* Fixes part of: flutter/flutter#88151
* Lands: flutter/packages#3259 (adds missing test)

Co-authored-by: James Leahy <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter p: video_player The Video Player plugin P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels. platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
9 participants