diff --git a/CHANGELOG.md b/CHANGELOG.md index 07fbaf824..ad814971c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Map: create shortcut to custom region and filters +- Video: frame stepping forward/backward actions ### Fixed diff --git a/plugins/aves_video_mpv/lib/src/controller.dart b/plugins/aves_video_mpv/lib/src/controller.dart index 0b42e9734..621f23506 100644 --- a/plugins/aves_video_mpv/lib/src/controller.dart +++ b/plugins/aves_video_mpv/lib/src/controller.dart @@ -214,10 +214,15 @@ class MpvVideoController extends AvesVideoController { @override Future skipFrames(int frameCount) async { - if (frameCount > 0) { - await _instance.frameStep(); - } else if (frameCount < 0) { - await _instance.frameBackStep(); + final platform = _instance.platform; + if (platform is NativePlayer) { + if (frameCount > 0) { + await platform.command(['frame-step']); + } else if (frameCount < 0) { + await platform.command(['frame-back-step']); + } + } else { + throw Exception('Platform player ${platform.runtimeType} does not support frame stepping'); } } diff --git a/plugins/aves_video_mpv/pubspec.lock b/plugins/aves_video_mpv/pubspec.lock index 7c8251cdf..fa2b74c94 100644 --- a/plugins/aves_video_mpv/pubspec.lock +++ b/plugins/aves_video_mpv/pubspec.lock @@ -180,8 +180,8 @@ packages: dependency: "direct main" description: path: media_kit - ref: frame-stepping - resolved-ref: "209221d605a0b2c34379e799a8e001cc359e6183" + ref: fd-support + resolved-ref: f5d6f97bc74bed33f231ea238fb47af0c57d2e07 url: "https://github.com/deckerst/media-kit.git" source: git version: "1.1.11" @@ -197,8 +197,8 @@ packages: dependency: "direct main" description: path: media_kit_video - ref: frame-stepping - resolved-ref: "209221d605a0b2c34379e799a8e001cc359e6183" + ref: HEAD + resolved-ref: fe317dba5d9e1bc25cb0b564a1f25607b0c7de2f url: "https://github.com/deckerst/media-kit.git" source: git version: "1.2.5" diff --git a/plugins/aves_video_mpv/pubspec.yaml b/plugins/aves_video_mpv/pubspec.yaml index f54c0f2b5..f5cbecd46 100644 --- a/plugins/aves_video_mpv/pubspec.yaml +++ b/plugins/aves_video_mpv/pubspec.yaml @@ -24,12 +24,11 @@ dependency_overrides: media_kit: git: url: https://github.com/deckerst/media-kit.git - ref: frame-stepping + ref: fd-support path: media_kit media_kit_video: git: url: https://github.com/deckerst/media-kit.git - ref: frame-stepping path: media_kit_video dev_dependencies: diff --git a/pubspec.lock b/pubspec.lock index 2a5080213..52bccd94a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -904,8 +904,8 @@ packages: dependency: "direct overridden" description: path: media_kit - ref: frame-stepping - resolved-ref: "209221d605a0b2c34379e799a8e001cc359e6183" + ref: fd-support + resolved-ref: f5d6f97bc74bed33f231ea238fb47af0c57d2e07 url: "https://github.com/deckerst/media-kit.git" source: git version: "1.1.11" @@ -921,8 +921,8 @@ packages: dependency: "direct overridden" description: path: media_kit_video - ref: frame-stepping - resolved-ref: "209221d605a0b2c34379e799a8e001cc359e6183" + ref: HEAD + resolved-ref: fe317dba5d9e1bc25cb0b564a1f25607b0c7de2f url: "https://github.com/deckerst/media-kit.git" source: git version: "1.2.5" diff --git a/pubspec.yaml b/pubspec.yaml index 9689a8ee3..788df781d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -124,12 +124,11 @@ dependency_overrides: media_kit: git: url: https://github.com/deckerst/media-kit.git - ref: frame-stepping + ref: fd-support path: media_kit media_kit_video: git: url: https://github.com/deckerst/media-kit.git - ref: frame-stepping path: media_kit_video dev_dependencies: