Skip to content

Commit 1d08833

Browse files
creativecreatorormaybenotEgor
authored andcommitted
[video_player] Set playback speed (flutter#3084)
1 parent 5fad247 commit 1d08833

File tree

13 files changed

+528
-173
lines changed

13 files changed

+528
-173
lines changed

packages/video_player/video_player/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.11.0
2+
3+
* Added option to set the video playback speed on the video controller.
4+
* **Minor breaking change**: fixed `VideoPlayerValue.toString` to insert a comma after `isBuffering`.
5+
16
## 0.10.12+5
27

38
* Depend on `video_player_platform_interface` version that contains the new `TestHostVideoPlayerApi`

packages/video_player/video_player/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,22 @@ class _VideoAppState extends State<VideoApp> {
127127
}
128128
}
129129
```
130+
131+
## Usage
132+
133+
The following section contains usage information that goes beyond what is included in the
134+
documentation in order to give a more elaborate overview of the API.
135+
136+
This is not complete as of now. You can contribute to this section by [opening a pull request](https://github.com/flutter/plugins/pulls).
137+
138+
### Playback speed
139+
140+
You can set the playback speed on your `_controller` (instance of `VideoPlayerController`) by
141+
calling `_controller.setPlaybackSpeed`. `setPlaybackSpeed` takes a `double` speed value indicating
142+
the rate of playback for your video.
143+
For example, when given a value of `2.0`, your video will play at 2x the regular playback speed
144+
and so on.
145+
146+
To learn about playback speed limitations, see the [`setPlaybackSpeed` method documentation](https://pub.dev/documentation/video_player/latest/video_player/VideoPlayerController/setPlaybackSpeed.html).
147+
148+
Furthermore, see the example app for an example playback speed implementation.

0 commit comments

Comments
 (0)