Fix: Background audio correctly pauses and resumes when viewing videos
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run

This commit is contained in:
otsmr 2026-08-22 21:22:07 +02:00
parent 4183ebd8e6
commit cf1cbb058e
7 changed files with 9 additions and 17 deletions

View file

@ -1,5 +1,9 @@
# Changelog # Changelog
## 0.5.1
- Fix: Background audio correctly pauses and resumes when viewing videos
## 0.5.0 ## 0.5.0
- New: Update to Signal's new PQC-ready key agreement PQXDH - New: Update to Signal's new PQC-ready key agreement PQXDH

@ -1 +1 @@
Subproject commit d1d70e1559a67bd5c4336547d215a03260153b00 Subproject commit b874b9cc309822d90b940fdfbc8fd1ad3afc2450

View file

@ -36,7 +36,7 @@ dependencies:
path: packages/video_player/video_player_avfoundation path: packages/video_player/video_player_avfoundation
- name: camera_android_camerax - name: camera_android_camerax
path: packages/camera/camera_android_camerax path: packages/camera/camera_android_camerax
commit: bb0e9f500828f3117a6ea96b898eaee3710e43d9 commit: b4f7d807a822a8ce327aae21353ac2217e928f6d
flutter_sharing_intent: flutter_sharing_intent:
git: https://github.com/bhagat-techind/flutter_sharing_intent.git git: https://github.com/bhagat-techind/flutter_sharing_intent.git
commit: aa1672f547d6579585fa27df0b28ffa2a2544aaa commit: aa1672f547d6579585fa27df0b28ffa2a2544aaa

View file

@ -92,8 +92,6 @@ PODS:
- nanopb/encode (3.30910.0) - nanopb/encode (3.30910.0)
- permission_handler_apple (9.3.0): - permission_handler_apple (9.3.0):
- Flutter - Flutter
- pro_video_editor (0.0.1):
- Flutter
- PromisesObjC (2.4.0) - PromisesObjC (2.4.0)
- rust_lib_twonly (0.0.1): - rust_lib_twonly (0.0.1):
- Flutter - Flutter
@ -122,7 +120,6 @@ DEPENDENCIES:
- google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`) - google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`)
- google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`) - google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- pro_video_editor (from `.symlinks/plugins/pro_video_editor/ios`)
- rust_lib_twonly (from `.symlinks/plugins/rust_lib_twonly/ios`) - rust_lib_twonly (from `.symlinks/plugins/rust_lib_twonly/ios`)
- screen_protector (from `.symlinks/plugins/screen_protector/ios`) - screen_protector (from `.symlinks/plugins/screen_protector/ios`)
- SwiftProtobuf - SwiftProtobuf
@ -170,8 +167,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/google_mlkit_face_detection/ios" :path: ".symlinks/plugins/google_mlkit_face_detection/ios"
permission_handler_apple: permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios" :path: ".symlinks/plugins/permission_handler_apple/ios"
pro_video_editor:
:path: ".symlinks/plugins/pro_video_editor/ios"
rust_lib_twonly: rust_lib_twonly:
:path: ".symlinks/plugins/rust_lib_twonly/ios" :path: ".symlinks/plugins/rust_lib_twonly/ios"
screen_protector: screen_protector:
@ -203,7 +198,6 @@ SPEC CHECKSUMS:
MLKitVision: 39a5a812db83c4a0794445088e567f3631c11961 MLKitVision: 39a5a812db83c4a0794445088e567f3631c11961
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
pro_video_editor: 44ef9a6d48dbd757ed428cf35396dd05f35c7830
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
rust_lib_twonly: 73165b05d0cda50db45852db63f49caa7f319520 rust_lib_twonly: 73165b05d0cda50db45852db63f49caa7f319520
screen_protector: 18c6aca2dc5d2a832f6787a5318f97f03e9d3150 screen_protector: 18c6aca2dc5d2a832f6787a5318f97f03e9d3150

View file

@ -24,9 +24,7 @@ class _VideoPlayerFileHelperState extends State<VideoPlayerFileHelper> {
super.initState(); super.initState();
_controller = VideoPlayerController.file( _controller = VideoPlayerController.file(
widget.videoPath, widget.videoPath,
videoPlayerOptions: VideoPlayerOptions( videoPlayerOptions: VideoPlayerOptions(),
mixWithOthers: true,
),
); );
unawaited( unawaited(

View file

@ -116,9 +116,7 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
}); });
videoController = VideoPlayerController.file( videoController = VideoPlayerController.file(
mediaService.originalPath, mediaService.originalPath,
videoPlayerOptions: VideoPlayerOptions( videoPlayerOptions: VideoPlayerOptions(),
mixWithOthers: true,
),
); );
videoController?.setLooping(true); videoController?.setLooping(true);
videoController videoController

View file

@ -426,9 +426,7 @@ class _MediaViewerViewState extends State<MediaViewerView> {
Future<void> _setupVideoPlayer(MediaFileService mediaLocal) async { Future<void> _setupVideoPlayer(MediaFileService mediaLocal) async {
final controller = VideoPlayerController.file( final controller = VideoPlayerController.file(
mediaLocal.tempPath, mediaLocal.tempPath,
videoPlayerOptions: VideoPlayerOptions( videoPlayerOptions: VideoPlayerOptions(),
mixWithOthers: mediaLocal.mediaFile.displayLimitInMilliseconds == null,
),
); );
await controller.setLooping( await controller.setLooping(