1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

fix hdr playback on android

This commit is contained in:
mertalev 2024-12-01 00:14:55 -05:00
parent fa3156e6ee
commit b15e01e2b6
No known key found for this signature in database
GPG key ID: CA85EF6600C9E8AD
7 changed files with 17 additions and 20 deletions

View file

@ -28,7 +28,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
compileSdkVersion 34
compileSdkVersion 35
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
@ -47,7 +47,7 @@ android {
defaultConfig {
applicationId "app.alextran.immich"
minSdkVersion 26
targetSdkVersion 34
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

View file

@ -35,7 +35,7 @@
<meta-data
android:name="io.flutter.embedding.android.EnableImpeller"
android:value="false" />
android:value="true" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"

View file

@ -16,8 +16,8 @@ subprojects {
if (project.plugins.hasPlugin("com.android.application") ||
project.plugins.hasPlugin("com.android.library")) {
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
compileSdkVersion 35
buildToolsVersion "35.0.0"
}
}
}

View file

@ -199,7 +199,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
background_downloader: 9f788ffc5de45acf87d6380e91ca0841066c18cf
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
@ -216,14 +216,14 @@ SPEC CHECKSUMS:
MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef
maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9
native_video_player: d12af78a1a4a8cf09775a5177d5b392def6fd23c
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
photo_manager: ff695c7a1dd5bc379974953a2b5c0a293f7c4c8a
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
@ -234,4 +234,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 64c9b5291666c0ca3caabdfe9865c141ac40321d
COCOAPODS: 1.15.2
COCOAPODS: 1.16.0

View file

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
@ -54,7 +55,8 @@ class NativeVideoViewerPage extends HookConsumerWidget {
final isCurrent = currentAsset.value == asset;
// Used to show the placeholder during hero animations for remote videos to avoid a stutter
final isVisible = useState(asset.isLocal || asset.isMotionPhoto);
final isVisible =
useState((Platform.isIOS && asset.isLocal) || asset.isMotionPhoto);
final log = Logger('NativeVideoViewerPage');
@ -306,13 +308,7 @@ class NativeVideoViewerPage extends HookConsumerWidget {
return;
}
if (loopVideo) {
try {
videoController.play();
} catch (error) {
log.severe('Error looping video: $error');
}
} else {
if (!loopVideo) {
WakelockPlus.disable();
}
}
@ -343,6 +339,7 @@ class NativeVideoViewerPage extends HookConsumerWidget {
nc.onPlaybackReady.addListener(onPlaybackReady);
nc.onPlaybackEnded.addListener(onPlaybackEnded);
nc.setLoop(loopVideo);
nc.loadVideoSource(source);
controller.value = nc;
Timer(const Duration(milliseconds: 200), checkIfBuffering);

View file

@ -1028,8 +1028,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "feat/headers"
resolved-ref: "35398174bb73ec62ee3a3fb81f4e4d5728d09ec0"
ref: "feat/exoplayer"
resolved-ref: "2139230b334b22b87de1dba47cc5632e5d172840"
url: "https://github.com/immich-app/native_video_player"
source: git
version: "1.3.1"

View file

@ -67,7 +67,7 @@ dependencies:
native_video_player:
git:
url: https://github.com/immich-app/native_video_player
ref: feat/headers
ref: feat/exoplayer
#image editing packages
crop_image: ^1.0.13