From 69b948f3d09aeb6d795fe948471d38ef0d57d9bf Mon Sep 17 00:00:00 2001
From: Alejandro Armas <58491232+mycroftsnm@users.noreply.github.com>
Date: Tue, 11 Jun 2024 13:14:49 -0300
Subject: [PATCH] fix(mobile): Motion Photos stopping music (#10151)

Add videoPlayer opt to prevent motionPhotos pausing music
---
 .../video_player_controller_provider.dart     |   3 +++
 .../video_player_controller_provider.g.dart   | Bin 4820 -> 4820 bytes
 .../providers/map/map_state.provider.g.dart   | Bin 933 -> 933 bytes
 3 files changed, 3 insertions(+)

diff --git a/mobile/lib/providers/asset_viewer/video_player_controller_provider.dart b/mobile/lib/providers/asset_viewer/video_player_controller_provider.dart
index f0f358343d..4f6c6f30ea 100644
--- a/mobile/lib/providers/asset_viewer/video_player_controller_provider.dart
+++ b/mobile/lib/providers/asset_viewer/video_player_controller_provider.dart
@@ -31,6 +31,9 @@ Future<VideoPlayerController> videoPlayerController(
     controller = VideoPlayerController.networkUrl(
       url,
       httpHeaders: {"x-immich-user-token": accessToken},
+      videoPlayerOptions: asset.livePhotoVideoId != null
+          ? VideoPlayerOptions(mixWithOthers: true)
+          : VideoPlayerOptions(mixWithOthers: false),
     );
   }
 
diff --git a/mobile/lib/providers/asset_viewer/video_player_controller_provider.g.dart b/mobile/lib/providers/asset_viewer/video_player_controller_provider.g.dart
index e447304b368b9919e09584784214164fc681ff0c..cfef55457d76f2f127babb5158ba2397123e34c0 100644
GIT binary patch
delta 53
zcmcbjdPQ}EEu)5+iIIt!Wul3Rk%hUTg+-!yvax|-nrU)kig8MsajKDVvV}>Cg=zBU
IRK|Qk0HECuI{*Lx

delta 53
zcmcbjdPQ}EEu)5sL6Wgynt768qPcNeVv>bPvaz9Il0lk*SyF0BnyImok)erka*E~V
IRK|Qk0Jzr=rvLx|

diff --git a/mobile/lib/providers/map/map_state.provider.g.dart b/mobile/lib/providers/map/map_state.provider.g.dart
index e12c69d7174c7b87138b0be31a7418dfcfec6d81..eff7b4b68e60f4fc361b714f016a64a2528017ff 100644
GIT binary patch
delta 53
zcmZ3=zLb4~8l#4>VOnBZs-byeqJ?R)iG{JbWulQ$YKn16l5ujfrAcC%sbzAiX_Cce
IKgMt-0HgsAYXATM

delta 53
zcmZ3=zLb4~8l#4Vd7_1xk#U;2ky(m~u|<lZp=pX~qM@mofn~C}p|QCUP$D(eC~dPJ
HV>lB4c-#%Z