[go: nahoru, domu]

Skip to content
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] Exposes VideoPlayerWebOptions. #6990

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

ditman
Copy link
Member
@ditman ditman commented Jun 26, 2024

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:

_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,
     ),
  ),
);
Bildschirmfoto 2023-07-06 um 17 04 59

Issues

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Co-authored-by: James Leahy defuncart@gmail.com

@ditman ditman requested a review from tarrinneal as a code owner June 26, 2024 01:47
@ditman ditman requested review from stuartmorgan and removed request for tarrinneal June 26, 2024 01:47
Copy link
Contributor
@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We really need to rework the way platform options work, since having to hard-code platform-specific logic in the app-facing package is gross, but since it was already mostly landed this way that's a problem for a future redesign.

packages/video_player/video_player/pubspec.yaml Outdated Show resolved Hide resolved
Update dependency format.
@ditman
Copy link
Member Author
ditman commented Jun 27, 2024

We really need to rework the way platform options work, since having to hard-code platform-specific logic in the app-facing package is gross, but since it was already mostly landed this way that's a problem for a future redesign.

Yes, it's clear that platform-specific code ends popping up in the plugin API :/

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 27, 2024
Copy link
Contributor
auto-submit bot commented Jun 27, 2024

auto label is removed for flutter/packages/6990, due to - The status or check suite Mac_arm64 ios_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 27, 2024
@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 27, 2024
@auto-submit auto-submit bot merged commit 6b024ca into flutter:main Jun 27, 2024
74 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 28, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 28, 2024
flutter/packages@03f5f6d...412ec46

2024-06-28 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.6 to 3.25.10 (flutter/packages#6924)
2024-06-27 ditman@gmail.com [video_player] Exposes VideoPlayerWebOptions. (flutter/packages#6990)
2024-06-27 ditman@gmail.com [ci] Add Wasm compilation to all_packages web app. (flutter/packages#6981)
2024-06-27 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Updates `README` with a usage section and fix some interface docs (flutter/packages#6988)
2024-06-27 stuartmorgan@google.com [tools] Fix vm test requirement (flutter/packages#6995)
2024-06-27 jacksongardner@google.com Update `web_benchmarks` package to properly support wasm. (flutter/packages#6970)
2024-06-27 stuartmorgan@google.com [pigeon] Implement equals for Java data classes (flutter/packages#6992)
2024-06-25 matanlurey@users.noreply.github.com Final refactor of `video_player_android` before `SurfaceProducer#setCallback`. (flutter/packages#6982)
2024-06-25 stuartmorgan@google.com [pigeon] Update testing and docs (flutter/packages#6984)
2024-06-25 parlough@gmail.com [various] Update flutter.dev links to more reliable destinations (flutter/packages#6963)
2024-06-25 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Adds initial Android implementation (flutter/packages#6733)
2024-06-25 engine-flutter-autoroll@skia.org Roll Flutter from 6c06abb to e726eb4 (51 revisions) (flutter/packages#6987)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@ditman ditman deleted the add-optional-web-options branch June 29, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: video_player
Projects
None yet
2 participants