Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[video_player] Playback speed #3084

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/video_player/video_player/CHANGELOG.md
@@ -1,3 +1,8 @@
## 0.11.0

* Added option to set the video playback speed on the video controller.
* **Minor breaking change**: fixed `VideoPlayerValue.toString` to insert a comma after `isBuffering`.

## 0.10.12+5

* Depend on `video_player_platform_interface` version that contains the new `TestHostVideoPlayerApi`
Expand Down
19 changes: 19 additions & 0 deletions packages/video_player/video_player/README.md
Expand Up @@ -127,3 +127,22 @@ class _VideoAppState extends State<VideoApp> {
}
}
```

## Usage

The following section contains usage information that goes beyond what is included in the
documentation in order to give a more elaborate overview of the API.

This is not complete as of now. You can contribute to this section by [opening a pull request](https://github.com/flutter/plugins/pulls).

### Playback speed

You can set the playback speed on your `_controller` (instance of `VideoPlayerController`) by
calling `_controller.setPlaybackSpeed`. `setPlaybackSpeed` takes a `double` speed value indicating
the rate of playback for your video.
For example, when given a value of `2.0`, your video will play at 2x the regular playback speed
and so on.

To learn about playback speed limitations, see the [`setPlaybackSpeed` method documentation](https://pub.dev/documentation/video_player/latest/video_player/VideoPlayerController/setPlaybackSpeed.html).

Furthermore, see the example app for an example playback speed implementation.