From cf1cbb058e7b335a51442e1ce7a50790d58219bc Mon Sep 17 00:00:00 2001 From: otsmr Date: Sat, 22 Aug 2026 21:22:07 +0200 Subject: [PATCH] Fix: Background audio correctly pauses and resumes when viewing videos --- CHANGELOG.md | 4 ++++ dependencies | 2 +- dependencies.yaml | 2 +- ios/Podfile.lock | 6 ------ lib/src/visual/helpers/video_player_file.helper.dart | 4 +--- lib/src/visual/views/camera/share_image_editor.view.dart | 4 +--- lib/src/visual/views/chats/media_viewer.view.dart | 4 +--- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2beeb76d..55ad76c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.5.1 + +- Fix: Background audio correctly pauses and resumes when viewing videos + ## 0.5.0 - New: Update to Signal's new PQC-ready key agreement PQXDH diff --git a/dependencies b/dependencies index d1d70e15..b874b9cc 160000 --- a/dependencies +++ b/dependencies @@ -1 +1 @@ -Subproject commit d1d70e1559a67bd5c4336547d215a03260153b00 +Subproject commit b874b9cc309822d90b940fdfbc8fd1ad3afc2450 diff --git a/dependencies.yaml b/dependencies.yaml index 5e695d6f..f2430ae9 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -36,7 +36,7 @@ dependencies: path: packages/video_player/video_player_avfoundation - name: camera_android_camerax path: packages/camera/camera_android_camerax - commit: bb0e9f500828f3117a6ea96b898eaee3710e43d9 + commit: b4f7d807a822a8ce327aae21353ac2217e928f6d flutter_sharing_intent: git: https://github.com/bhagat-techind/flutter_sharing_intent.git commit: aa1672f547d6579585fa27df0b28ffa2a2544aaa diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5532e351..010108ce 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -92,8 +92,6 @@ PODS: - nanopb/encode (3.30910.0) - permission_handler_apple (9.3.0): - Flutter - - pro_video_editor (0.0.1): - - Flutter - PromisesObjC (2.4.0) - rust_lib_twonly (0.0.1): - Flutter @@ -122,7 +120,6 @@ DEPENDENCIES: - google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`) - google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/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`) - screen_protector (from `.symlinks/plugins/screen_protector/ios`) - SwiftProtobuf @@ -170,8 +167,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/google_mlkit_face_detection/ios" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" - pro_video_editor: - :path: ".symlinks/plugins/pro_video_editor/ios" rust_lib_twonly: :path: ".symlinks/plugins/rust_lib_twonly/ios" screen_protector: @@ -203,7 +198,6 @@ SPEC CHECKSUMS: MLKitVision: 39a5a812db83c4a0794445088e567f3631c11961 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d - pro_video_editor: 44ef9a6d48dbd757ed428cf35396dd05f35c7830 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 rust_lib_twonly: 73165b05d0cda50db45852db63f49caa7f319520 screen_protector: 18c6aca2dc5d2a832f6787a5318f97f03e9d3150 diff --git a/lib/src/visual/helpers/video_player_file.helper.dart b/lib/src/visual/helpers/video_player_file.helper.dart index 93ffdbf0..ce0f8660 100644 --- a/lib/src/visual/helpers/video_player_file.helper.dart +++ b/lib/src/visual/helpers/video_player_file.helper.dart @@ -24,9 +24,7 @@ class _VideoPlayerFileHelperState extends State { super.initState(); _controller = VideoPlayerController.file( widget.videoPath, - videoPlayerOptions: VideoPlayerOptions( - mixWithOthers: true, - ), + videoPlayerOptions: VideoPlayerOptions(), ); unawaited( diff --git a/lib/src/visual/views/camera/share_image_editor.view.dart b/lib/src/visual/views/camera/share_image_editor.view.dart index f5ee5e06..dc9ee59b 100644 --- a/lib/src/visual/views/camera/share_image_editor.view.dart +++ b/lib/src/visual/views/camera/share_image_editor.view.dart @@ -116,9 +116,7 @@ class _ShareImageEditorView extends State { }); videoController = VideoPlayerController.file( mediaService.originalPath, - videoPlayerOptions: VideoPlayerOptions( - mixWithOthers: true, - ), + videoPlayerOptions: VideoPlayerOptions(), ); videoController?.setLooping(true); videoController diff --git a/lib/src/visual/views/chats/media_viewer.view.dart b/lib/src/visual/views/chats/media_viewer.view.dart index 5cc36dda..e52022e9 100644 --- a/lib/src/visual/views/chats/media_viewer.view.dart +++ b/lib/src/visual/views/chats/media_viewer.view.dart @@ -426,9 +426,7 @@ class _MediaViewerViewState extends State { Future _setupVideoPlayer(MediaFileService mediaLocal) async { final controller = VideoPlayerController.file( mediaLocal.tempPath, - videoPlayerOptions: VideoPlayerOptions( - mixWithOthers: mediaLocal.mediaFile.displayLimitInMilliseconds == null, - ), + videoPlayerOptions: VideoPlayerOptions(), ); await controller.setLooping(