-
Notifications
You must be signed in to change notification settings - Fork 28.6k
VideoPlayerWebOptions is not working #150327
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
Comments
Thanks for the report. I can reproduce this issue as well. Current package versions: flutter doctor -v[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1 23B74 darwin-x64, locale en-VN)
• Flutter version 3.22.2 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (31 hours ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode15.3.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /Applications/Android Studio.app/
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] VS Code (version 1.89.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.90.0
[✓] Connected device (3 available)
• iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios • iOS 15.8 19H370
• macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.142
[✓] Network resources
• All expected network resources are available.
• No issues found! |
The issue here is that flutter/packages#3259 never landed, but we landed the platform interface piece that was split out, so we have options that are defined, but not honored by the implementation package. (This isn't supposed to happen because we're supposed to have full approval on the main PR first, and also in our more current designs we wouldn't have this options class in the platform interface package at all.) Reverting the platform interface would be a breaking change. @ditman Any chance you could take over flutter/packages#3259 to get it over the line? If not, we should at least deprecate the options and document that they don't work. |
@stuartmorgan yes, let me assign the PR to myself; I'll try to land it next time I'm gardening the repo! (the week of June 24th) |
@stuartmorgan @ditman Do you have any plan to make this fix work on Edge too? Picture in Picture still exists with Edge. I have not tried Firefox. |
What version of |
@stuartmorgan
|
That version does have support for the new options, so please file a new issue with details for investigation. |
I thought bumping the platform interface would be enough (because the web version wouldn't resolve to an earlier version of the PI)? |
Nope, the current constraints would allow for the following combination:
This is why almost any feature addition involves bumping the platform implementation constraints when we plumb it to the app-facing package; it will compile without it because it only uses the platform interface for that, but it won't work. |
Yyyikes, I'll prepare a quick update later (in the meantime |
Okay, I created a new issue: #151020 |
Updates minimum web implementation version to ensure support for the new `webOptions` exposed in the previous release. ## Issues: * Described here: flutter/flutter#150327 (comment)
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 |
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]>
Steps to reproduce
Expected results
Cannot download/fullscreen/... videos
Actual results
Nothing works. Videos can still be downloaded/...
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
No error.
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: