video_player_platform_interface
6.9.0A common platform interface for the video_player plugin.
Readme
video_player_platform_interface
A common platform interface for the video_player plugin.
This interface allows platform-specific implementations of the video_player
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
Usage
To implement a new platform-specific implementation of video_player, extend
VideoPlayerPlatform with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
VideoPlayerPlatform by calling
VideoPlayerPlatform.instance = MyPlatformVideoPlayer().
Note on breaking changes
Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package.
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change.
Changelog
6.9.0
- Adds
backBufferDurationMstoVideoPlayerOptionsto support configuring the back buffer duration.
6.8.0
- Adds
preventsDisplaySleepDuringVideoPlaybacktoVideoPlayerOptionsandsetPreventsDisplaySleepDuringVideoPlaybacktoVideoPlayerPlatform. The default implementation is a no-op so platforms that do not support controlling display sleep silently fall back to their default behavior. - Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
6.7.0
- Adds
VideoTrackclass andgetVideoTracks(),selectVideoTrack(),isVideoTrackSupportAvailable()methods for video track (quality) selection. - Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
6.6.0
- Adds
VideoAudioTrackclass andgetAudioTracks(),selectAudioTrack(),isAudioTrackSupportAvailable()methods for audio track management.
6.5.0
- Adds a
setAllowBackgroundPlaybackmethod to dynamically control background playback. - Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
6.4.0
- Adds HTML5 video poster support as a VideoPlayerWebOptions.
- Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.
6.3.0
- Adds support for platform views as an optional way of displaying a video.
- Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
6.2.3
- Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
- Clarified that
VideoEventType.initializedcannot be sent more than once.
6.2.2
- Updates minimum required plugin_platform_interface version to 2.1.7.
- Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
6.2.1
- Adds pub topics to package metadata.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
6.2.0
- Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
- Adds web options to customize control's list and displaying context menu.
6.1.0
- Aligns Dart and Flutter SDK constraints.
- Adds the
VideoEventType.isPlayingStateUpdateevent to track changes in play / pause state with the underlying video player.
6.0.2
- Updates links for the merge of flutter/plugins into flutter/packages.
- Updates minimum Flutter version to 3.0.
6.0.1
- Fixes comment describing file URI construction.
6.0.0
- BREAKING CHANGE: Removes
MethodChannelVideoPlayer. The default implementation is now only a placeholder with no functionality; implementations ofvideo_playermust include their ownVideoPlayerPlatformDart implementation. - Updates minimum Flutter version to 2.10.
- Fixes violations of new analysis option use_named_constants.
5.1.4
- Fixes avoid_redundant_argument_values lint warnings and minor typos.
- Ignores unnecessary import warnings in preparation for upcoming Flutter changes.
5.1.3
- Updates references to the obsolete master branch.
- Removes unnecessary imports.
5.1.2
- Adopts
Object.hash. - Removes obsolete dependency on
pedantic.
5.1.1
- Adds
rotationCorrection(for Android playing videos recorded in landscapeRight #60327).
5.1.0
- Adds
allowBackgroundPlaybacktoVideoPlayerOptions.
5.0.2
- Adds the Pigeon definitions used to create the method channel implementation.
- Internal code cleanup for stricter analysis options.
5.0.1
- Update to use the
verifymethod introduced in platform_plugin_interface 2.1.0.
5.0.0
- BREAKING CHANGES:
- Updates to extending
PlatformInterface. RemovesisMock, in favor of the now-standardMockPlatformInterfaceMixin. - Removes test.dart from the public interface. Tests in other packages should
mock
VideoPlatformInterfacerather than the method channel.
- Updates to extending
4.2.0
- Add
contentUritoDataSourceType.
4.1.0
- Add
httpHeaderstoDataSource
4.0.0
- Breaking Changes:
- Migrate to null-safety
- Update to latest Pigeon. This includes a breaking change to how the test logic is exposed.
- Add note about the
mixWithOthersoption being ignored on the web. - Make DataSource's
uriparameter nullable. messages.dartsets Dart2.12.
3.0.0
- Version 3 only was published as nullsafety "previews".
2.2.1
- Update Flutter SDK constraint.
2.2.0
- Added option to set the video playback speed on the video controller.
2.1.1
- Fix mixWithOthers test channel.
2.1.0
- Add VideoPlayerOptions with audio mix mode
2.0.2
- Migrated tests to use pigeon correctly.
2.0.1
- Updated minimum Dart version.
- Added class to help testing Pigeon communication.
2.0.0
- Migrated to pigeon.
1.0.5
- Make the pedantic dev_dependency explicit.
1.0.4
- Remove the deprecated
author:field from pubspec.yaml - Require Flutter SDK 1.10.0 or greater.
1.0.3
- Document public API.
1.0.2
- Fix unawaited futures in the tests.
1.0.1
- Return correct platform event type when buffering
1.0.0
- Initial release.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add video_player_platform_interfacepubspec.yaml
name: video_player_platform_interface
description: A common platform interface for the video_player plugin.
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_platform_interface
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 6.9.0
environment:
sdk: ^3.10.0
flutter: ">=3.38.0"
dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.7
dev_dependencies:
flutter_test:
sdk: flutter
topics:
- video
- video-player
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | On demand | Download | 120ac27f…fb5cd9 |
| 1.0.1 | On demand | Download | 8f0cba1a…616680 |
| 1.0.2 | On demand | Download | abc65f95…c211db |
| 1.0.3 | On demand | Download | 8fd0b8ca…40ea55 |
| 1.0.4 | On demand | Download | c644c311…6e7557 |
| 1.0.5 | On demand | Download | 8116acf5…276632 |
| 2.0.0 | On demand | Download | f158642d…b08fe3 |
| 2.0.1 | On demand | Download | 1d1b5b04…256e67 |
| 2.0.2 | On demand | Download | 8c2b7ff1…ba935e |
| 2.1.0 | On demand | Download | 04adf880…c4d11a |
| 2.1.1 | On demand | Download | e79f75c7…ac8643 |
| 2.2.0 | On demand | Download | bb480245…09fa9c |
| 3.0.0-nullsafety.1 | On demand | Download | 87cc4b5b…457d16 |
| 3.0.0-nullsafety.2 | On demand | Download | 4b966e80…fafa44 |
| 3.0.0-nullsafety.3 | On demand | Download | 4b114482…307e0b |
| 4.0.0-nullsafety.0 | On demand | Download | 1341d8a7…38a927 |
| 4.0.0 | On demand | Download | d1b0964b…3a361d |
| 4.1.0 | On demand | Download | ec4d9df5…0292d6 |
| 4.2.0 | On demand | Download | a1d56477…9ba0f7 |
| 5.0.0 | On demand | Download | 2432273a…04f974 |
| 5.0.1 | On demand | Download | 83161ce6…ca210d |
| 5.0.2 | On demand | Download | 1b85b791…74e336 |
| 5.1.0 | On demand | Download | ac0b3515…483cb6 |
| 5.1.1 | On demand | Download | 70ed1683…838635 |
| 5.1.2 | On demand | Download | 5c30b0a7…66f4be |
| 5.1.3 | On demand | Download | 2f7280c1…b99e63 |
| 5.1.4 | On demand | Download | 318a6d20…dd4343 |
| 6.0.0 | On demand | Download | 18591bb3…1e85ff |
| 6.0.1 | On demand | Download | 42bb75de…432dae |
| 6.0.2 | On demand | Download | 72ba04ad…ec049b |
| 6.1.0 | On demand | Download | a8c4dcae…bec684 |
| 6.2.0 | On demand | Download | 1ca9acd7…802988 |
| 6.2.1 | On demand | Download | be72301b…48f73a |
| 6.2.2 | On demand | Download | 23645472…550bc6 |
| 6.2.3 | On demand | Download | 229d7642…af9bbb |
| 6.3.0 | On demand | Download | df534476…16a844 |
| 6.4.0 | On demand | Download | cf2a1d29…c1db5a |
| 6.5.0 | On demand | Download | 9e372520…53793b |
| 6.6.0 | On demand | Download | 57c5d731…9f24ec |
| 6.7.0 | On demand | Download | 16eaed52…46c6e0 |
| 6.8.0 | On demand | Download | e4ae5bc9…dd1613 |
| 6.9.0 | Cached · Upstream SHA-256 matched | Download | 92c0fbab…f593ce |
Dependencies
flutter {
"sdk": "flutter"
}
plugin_platform_interface "^2.1.7"