[mob] Add support for playing preview for shared public links (#6277)
## Description ## Tests Tested locally and verified that I am able to play video preview
This commit is contained in:
@@ -129,6 +129,9 @@ PODS:
|
||||
- libwebp/sharpyuv (1.5.0)
|
||||
- libwebp/webp (1.5.0):
|
||||
- libwebp/sharpyuv
|
||||
- local_auth_darwin (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- local_auth_ios (0.0.1):
|
||||
- Flutter
|
||||
- Mantle (2.2.0):
|
||||
@@ -267,6 +270,7 @@ DEPENDENCIES:
|
||||
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
|
||||
- integration_test (from `.symlinks/plugins/integration_test/ios`)
|
||||
- launcher_icon_switcher (from `.symlinks/plugins/launcher_icon_switcher/ios`)
|
||||
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
|
||||
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
|
||||
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
|
||||
- media_extension (from `.symlinks/plugins/media_extension/ios`)
|
||||
@@ -300,7 +304,7 @@ DEPENDENCIES:
|
||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/ente-io/ffmpeg-kit-custom-repo-ios:
|
||||
https://github.com/ente-io/ffmpeg-kit-custom-repo-ios.git:
|
||||
- ffmpeg_kit_custom
|
||||
trunk:
|
||||
- Firebase
|
||||
@@ -375,6 +379,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/integration_test/ios"
|
||||
launcher_icon_switcher:
|
||||
:path: ".symlinks/plugins/launcher_icon_switcher/ios"
|
||||
local_auth_darwin:
|
||||
:path: ".symlinks/plugins/local_auth_darwin/darwin"
|
||||
local_auth_ios:
|
||||
:path: ".symlinks/plugins/local_auth_ios/ios"
|
||||
maps_launcher:
|
||||
@@ -439,82 +445,83 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
app_links: 76b66b60cc809390ca1ad69bfd66b998d2387ac7
|
||||
background_fetch: 94b36ee293e82972852dba8ede1fbcd3bd3d9d57
|
||||
battery_info: 83f3aae7be2fccefab1d2bf06b8aa96f11c8bcdd
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
|
||||
dart_ui_isolate: 46f6714abe6891313267153ef6f9748d8ecfcab1
|
||||
device_info_plus: 335f3ce08d2e174b9fdc3db3db0f4e3b1f66bd89
|
||||
app_links: f3e17e4ee5e357b39d8b95290a9b2c299fca71c6
|
||||
background_fetch: 39f11371c0dce04b001c4bfd5e782bcccb0a85e2
|
||||
battery_info: b6c551049266af31556b93c9d9b9452cfec0219f
|
||||
connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d
|
||||
cupertino_http: 947a233f40cfea55167a49f2facc18434ea117ba
|
||||
dart_ui_isolate: d5bcda83ca4b04f129d70eb90110b7a567aece14
|
||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||
ffmpeg_kit_custom: 682b4f2f1ff1f8abae5a92f6c3540f2441d5be99
|
||||
ffmpeg_kit_flutter: 915b345acc97d4142e8a9a8549d177ff10f043f5
|
||||
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
||||
ffmpeg_kit_flutter: 9dce4803991478c78c6fb9f972703301101095fe
|
||||
file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808
|
||||
Firebase: d80354ed7f6df5f9aca55e9eb47cc4b634735eaf
|
||||
firebase_core: 6cbed78b4f298ed103a9fd034e6dbc846320480f
|
||||
firebase_messaging: 5e0adf2eb18b0ee59aa0c109314c091a0497ecac
|
||||
firebase_core: 6e223dfa350b2edceb729cea505eaaef59330682
|
||||
firebase_messaging: 07fde77ae28c08616a1d4d870450efc2b38cf40d
|
||||
FirebaseCore: 99fe0c4b44a39f37d99e6404e02009d2db5d718d
|
||||
FirebaseCoreInternal: df24ce5af28864660ecbd13596fc8dd3a8c34629
|
||||
FirebaseInstallations: 6c963bd2a86aca0481eef4f48f5a4df783ae5917
|
||||
FirebaseMessaging: 487b634ccdf6f7b7ff180fdcb2a9935490f764e8
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_email_sender: aa1e9772696691d02cd91fea829856c11efb8e58
|
||||
flutter_image_compress_common: 1697a328fd72bfb335507c6bca1a65fa5ad87df1
|
||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
||||
flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb
|
||||
flutter_native_splash: 6cad9122ea0fad137d23137dd14b937f3e90b145
|
||||
flutter_secure_storage: 2c2ff13db9e0a5647389bff88b0ecac56e3f3418
|
||||
flutter_sodium: 7e4621538491834eba53bd524547854bcbbd6987
|
||||
flutter_timezone: 7c838e17ffd4645d261e87037e5bebf6d38fe544
|
||||
fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
|
||||
flutter_email_sender: e03bdda7637bcd3539bfe718fddd980e9508efaa
|
||||
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
|
||||
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
|
||||
flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f
|
||||
flutter_native_splash: f71420956eb811e6d310720fee915f1d42852e7a
|
||||
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
||||
flutter_sodium: a00383520fc689c688b66fd3092984174712493e
|
||||
flutter_timezone: ac3da59ac941ff1c98a2e1f0293420e020120282
|
||||
fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
|
||||
home_widget: f169fc41fd807b4d46ab6615dc44d62adbf9f64f
|
||||
image_editor_common: 3de87e7c4804f4ae24c8f8a998362b98c105cac1
|
||||
in_app_purchase_storekit: d1a48cb0f8b29dbf5f85f782f5dd79b21b90a5e6
|
||||
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
|
||||
launcher_icon_switcher: 84c218d233505aa7d8655d8fa61a3ba802c022da
|
||||
home_widget: 0434835a4c9a75704264feff6be17ea40e0f0d57
|
||||
image_editor_common: d6f6644ae4a6de80481e89fe6d0a8c49e30b4b43
|
||||
in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783
|
||||
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
|
||||
launcher_icon_switcher: 8e0ad2131a20c51c1dd939896ee32e70cd845b37
|
||||
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
|
||||
local_auth_ios: f7a1841beef3151d140a967c2e46f30637cdf451
|
||||
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
|
||||
local_auth_ios: 5046a18c018dd973247a0564496c8898dbb5adf9
|
||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||
maps_launcher: edf829809ba9e894d70e569bab11c16352dedb45
|
||||
media_extension: 671e2567880d96c95c65c9a82ccceed8f2e309fd
|
||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||
motion_sensors: 741e702c17467b9569a92165dda8d4d88c6167f1
|
||||
motionphoto: 23e2aeb5c6380112f69468d71f970fa7438e5ed1
|
||||
move_to_background: 7e3467dd2a1d1013e98c9c1cb93fd53cd7ef9d84
|
||||
maps_launcher: 2e5b6a2d664ec6c27f82ffa81b74228d770ab203
|
||||
media_extension: 6618f07abd762cdbfaadf1b0c56a287e820f0c84
|
||||
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
|
||||
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
|
||||
motion_sensors: 03f55b7c637a7e365a0b5f9697a449f9059d5d91
|
||||
motionphoto: 8b65ce50c7d7ff3c767534fc3768b2eed9ac24e4
|
||||
move_to_background: cd3091014529ec7829e342ad2d75c0a11f4378a5
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
native_video_player: e363dd14f6a498ad8a8f7e6486a0db046ad19f13
|
||||
objective_c: 89e720c30d716b036faf9c9684022048eee1eee2
|
||||
onnxruntime: f9b296392c96c42882be020a59dbeac6310d81b2
|
||||
native_video_player: 5d36066807b680e181473e6890dde643ac85380d
|
||||
objective_c: 77e887b5ba1827970907e10e832eec1683f3431d
|
||||
onnxruntime: e7c2ae44385191eaad5ae64c935a72debaddc997
|
||||
onnxruntime-c: a909204639a1f035f575127ac406f781ac797c9c
|
||||
onnxruntime-objc: b6fab0f1787aa6f7190c2013f03037df4718bd8b
|
||||
open_mail_app: 7314a609e88eed22d53671279e189af7a0ab0f11
|
||||
open_mail_app: 70273c53f768beefdafbe310c3d9086e4da3cb02
|
||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
||||
photo_manager: d2fbcc0f2d82458700ee6256a15018210a81d413
|
||||
privacy_screen: 3159a541f5d3a31bea916cfd4e58f9dc722b3fd4
|
||||
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
photo_manager: ff695c7a1dd5bc379974953a2b5c0a293f7c4c8a
|
||||
privacy_screen: 1a131c052ceb3c3659934b003b0d397c2381a24e
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
receive_sharing_intent: 222384f00ffe7e952bbfabaa9e3967cb87e5fe00
|
||||
receive_sharing_intent: 79c848f5b045674ad60b9fea3bafea59962ad2c1
|
||||
SDWebImage: f84b0feeb08d2d11e6a9b843cb06d75ebf5b8868
|
||||
SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380
|
||||
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
|
||||
sentry_flutter: 942017adbe00f963061cb11ec260414a990b7a42
|
||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sentry_flutter: 6a134f9d381e49f22ea25a67736cf0cf4d02ec9c
|
||||
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
|
||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
|
||||
sqlite3: fc1400008a9b3525f5914ed715a5d1af0b8f4983
|
||||
sqlite3_flutter_libs: 3c323550ef3b928bc0aa9513c841e45a7d242832
|
||||
system_info_plus: 555ce7047fbbf29154726db942ae785c29211740
|
||||
thermal: d4c48be750d1ddbab36b0e2dcb2471531bc8df41
|
||||
ua_client_hints: 92fe0d139619b73ec9fcb46cc7e079a26178f586
|
||||
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
|
||||
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
|
||||
video_thumbnail: 584ccfa55d8fd2f3d5507218b0a18d84c839c620
|
||||
volume_controller: 3657a1f65bedb98fa41ff7dc5793537919f31b12
|
||||
wakelock_plus: 04623e3f525556020ebd4034310f20fe7fda8b49
|
||||
sqlite3_flutter_libs: 069c435986dd4b63461aecd68f4b30be4a9e9daa
|
||||
system_info_plus: 5393c8da281d899950d751713575fbf91c7709aa
|
||||
thermal: a9261044101ae8f532fa29cab4e8270b51b3f55c
|
||||
ua_client_hints: aeabd123262c087f0ce151ef96fa3ab77bfc8b38
|
||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||
video_thumbnail: 94ba6705afbaa120b77287080424930f23ea0c40
|
||||
volume_controller: 2e3de73d6e7e81a0067310d17fb70f2f86d71ac7
|
||||
wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
|
||||
|
||||
PODFILE CHECKSUM: a8ef88ad74ba499756207e7592c6071a96756d18
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
CEE6BE702D7AE7FD00E4048B /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DACD83C2B755B0600BA9516 /* WidgetKit.framework */; };
|
||||
CEE6BE712D7AE7FD00E4048B /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DACD83E2B755B0600BA9516 /* SwiftUI.framework */; };
|
||||
CEE6BE7C2D7AE7FE00E4048B /* EnteMemoryWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = CEE6BE6F2D7AE7FD00E4048B /* EnteMemoryWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
DA6BE5E826B3BC8600656280 /* (null) in Resources */ = {isa = PBXBuildFile; };
|
||||
DA6BE5E826B3BC8600656280 /* BuildFile in Resources */ = {isa = PBXBuildFile; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -112,21 +112,21 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
CEE166342DD5E7830012CF61 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
||||
CEE166342DD5E7830012CF61 /* Exceptions for "EnteAlbumWidget" folder in "EnteAlbumWidgetExtension" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = CEE166222DD5E7820012CF61 /* EnteAlbumWidgetExtension */;
|
||||
};
|
||||
CEE1668C2DD5F6F30012CF61 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
||||
CEE1668C2DD5F6F30012CF61 /* Exceptions for "EntePeopleWidget" folder in "EntePeopleWidgetExtension" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = CEE1667A2DD5F6F20012CF61 /* EntePeopleWidgetExtension */;
|
||||
};
|
||||
CEE6BE802D7AE7FE00E4048B /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
|
||||
CEE6BE802D7AE7FE00E4048B /* Exceptions for "EnteMemoryWidget" folder in "EnteMemoryWidgetExtension" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
@@ -136,9 +136,42 @@
|
||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
CEE166262DD5E7820012CF61 /* EnteAlbumWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (CEE166342DD5E7830012CF61 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = EnteAlbumWidget; sourceTree = "<group>"; };
|
||||
CEE1667E2DD5F6F20012CF61 /* EntePeopleWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (CEE1668C2DD5F6F30012CF61 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = EntePeopleWidget; sourceTree = "<group>"; };
|
||||
CEE6BE722D7AE7FD00E4048B /* EnteMemoryWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (CEE6BE802D7AE7FE00E4048B /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = EnteMemoryWidget; sourceTree = "<group>"; };
|
||||
CEE166262DD5E7820012CF61 /* EnteAlbumWidget */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
CEE166342DD5E7830012CF61 /* Exceptions for "EnteAlbumWidget" folder in "EnteAlbumWidgetExtension" target */,
|
||||
);
|
||||
explicitFileTypes = {
|
||||
};
|
||||
explicitFolders = (
|
||||
);
|
||||
path = EnteAlbumWidget;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CEE1667E2DD5F6F20012CF61 /* EntePeopleWidget */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
CEE1668C2DD5F6F30012CF61 /* Exceptions for "EntePeopleWidget" folder in "EntePeopleWidgetExtension" target */,
|
||||
);
|
||||
explicitFileTypes = {
|
||||
};
|
||||
explicitFolders = (
|
||||
);
|
||||
path = EntePeopleWidget;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CEE6BE722D7AE7FD00E4048B /* EnteMemoryWidget */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
CEE6BE802D7AE7FE00E4048B /* Exceptions for "EnteMemoryWidget" folder in "EnteMemoryWidgetExtension" target */,
|
||||
);
|
||||
explicitFileTypes = {
|
||||
};
|
||||
explicitFolders = (
|
||||
);
|
||||
path = EnteMemoryWidget;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -414,7 +447,7 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
DA6BE5E826B3BC8600656280 /* (null) in Resources */,
|
||||
DA6BE5E826B3BC8600656280 /* BuildFile in Resources */,
|
||||
277218A0270F596900FFE3CC /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -516,6 +549,7 @@
|
||||
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/launcher_icon_switcher/launcher_icon_switcher.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/local_auth_darwin/local_auth_darwin.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/media_extension/media_extension.framework",
|
||||
@@ -611,6 +645,7 @@
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/launcher_icon_switcher.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_darwin.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/media_extension.framework",
|
||||
|
||||
@@ -37,12 +37,12 @@ import "package:photos/services/machine_learning/face_ml/person/person_service.d
|
||||
import 'package:photos/services/machine_learning/ml_service.dart';
|
||||
import 'package:photos/services/machine_learning/semantic_search/semantic_search_service.dart';
|
||||
import "package:photos/services/notification_service.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import 'package:photos/services/push_service.dart';
|
||||
import 'package:photos/services/search_service.dart';
|
||||
import 'package:photos/services/sync/local_sync_service.dart';
|
||||
import 'package:photos/services/sync/remote_sync_service.dart';
|
||||
import "package:photos/services/sync/sync_service.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import "package:photos/services/wake_lock_service.dart";
|
||||
import 'package:photos/ui/tools/app_lock.dart';
|
||||
import 'package:photos/ui/tools/lock_screen.dart';
|
||||
@@ -222,8 +222,12 @@ Future<void> _init(bool isBackground, {String via = ''}) async {
|
||||
await NetworkClient.instance.init(packageInfo);
|
||||
_logger.info("NetworkClient init done $tlog");
|
||||
|
||||
ServiceLocator.instance
|
||||
.init(preferences, NetworkClient.instance.enteDio,NetworkClient.instance.getDio(), packageInfo);
|
||||
ServiceLocator.instance.init(
|
||||
preferences,
|
||||
NetworkClient.instance.enteDio,
|
||||
NetworkClient.instance.getDio(),
|
||||
packageInfo,
|
||||
);
|
||||
|
||||
_logger.info("UserService init $tlog");
|
||||
await UserService.instance.init();
|
||||
@@ -267,7 +271,7 @@ Future<void> _init(bool isBackground, {String via = ''}) async {
|
||||
});
|
||||
}
|
||||
_logger.info("PushService/HomeWidget done $tlog");
|
||||
PreviewVideoStore.instance.init(preferences);
|
||||
VideoPreviewService.instance.init(preferences);
|
||||
unawaited(SemanticSearchService.instance.init());
|
||||
unawaited(MLService.instance.init());
|
||||
await PersonService.init(
|
||||
@@ -298,7 +302,7 @@ void logLocalSettings() {
|
||||
);
|
||||
_logger.info("Gallery grid size: ${localSettings.getPhotoGridSize()}");
|
||||
_logger.info(
|
||||
"Video streaming is enalbed: ${PreviewVideoStore.instance.isVideoStreamingEnabled}",
|
||||
"Video streaming is enalbed: ${VideoPreviewService.instance.isVideoStreamingEnabled}",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1260,6 +1260,15 @@ class CollectionsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
Map<String, String> publicCollectionHeaders(int collectionID) {
|
||||
final String? albumToken = _cachedPublicAlbumToken[collectionID];
|
||||
final String? albumJwtToken = _cachedPublicAlbumJWT[collectionID];
|
||||
return {
|
||||
if (albumToken != null) "X-Auth-Access-Token": albumToken,
|
||||
if (albumJwtToken != null) "X-Auth-Access-Token-JWT": albumJwtToken,
|
||||
};
|
||||
}
|
||||
|
||||
/// Is a public link opened in the app via deeplink
|
||||
bool isSharedPublicLink(int collectionID) {
|
||||
return _cachedPublicCollectionID.contains(collectionID);
|
||||
|
||||
@@ -20,7 +20,7 @@ import "package:photos/services/machine_learning/face_ml/person/person_service.d
|
||||
import "package:photos/services/machine_learning/ml_indexing_isolate.dart";
|
||||
import 'package:photos/services/machine_learning/ml_result.dart';
|
||||
import "package:photos/services/machine_learning/semantic_search/semantic_search_service.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import "package:photos/utils/ml_util.dart";
|
||||
import "package:photos/utils/network_util.dart";
|
||||
import "package:photos/utils/ram_check_util.dart";
|
||||
@@ -165,7 +165,7 @@ class MLService {
|
||||
} finally {
|
||||
_isRunningML = false;
|
||||
computeController.releaseCompute(ml: true);
|
||||
PreviewVideoStore.instance.queueFiles();
|
||||
VideoPreviewService.instance.queueFiles();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ import 'package:photos/services/ignored_files_service.dart';
|
||||
import "package:photos/services/language_service.dart";
|
||||
import 'package:photos/services/local_file_update_service.dart';
|
||||
import "package:photos/services/notification_service.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import 'package:photos/services/sync/diff_fetcher.dart';
|
||||
import 'package:photos/services/sync/sync_service.dart';
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import 'package:photos/utils/file_uploader.dart';
|
||||
import 'package:photos/utils/file_util.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -129,7 +129,7 @@ class RemoteSyncService {
|
||||
|
||||
fileDataService.syncFDStatus().then((_) {
|
||||
if (!flagService.hasGrantedMLConsent) {
|
||||
PreviewVideoStore.instance
|
||||
VideoPreviewService.instance
|
||||
.queueFiles(); // if ML is enabled the MLService will queue when ML is done
|
||||
}
|
||||
}).ignore();
|
||||
|
||||
@@ -29,6 +29,7 @@ import "package:photos/models/preview/playlist_data.dart";
|
||||
import "package:photos/models/preview/preview_item.dart";
|
||||
import "package:photos/models/preview/preview_item_status.dart";
|
||||
import "package:photos/service_locator.dart";
|
||||
import "package:photos/services/collections_service.dart";
|
||||
import "package:photos/services/filedata/model/file_data.dart";
|
||||
import "package:photos/ui/notification/toast.dart";
|
||||
import "package:photos/utils/exif_util.dart";
|
||||
@@ -40,26 +41,28 @@ import "package:shared_preferences/shared_preferences.dart";
|
||||
|
||||
const _maxRetryCount = 3;
|
||||
|
||||
class PreviewVideoStore {
|
||||
class VideoPreviewService {
|
||||
final _logger = Logger("VideoPreviewService");
|
||||
final LinkedHashMap<int, PreviewItem> _items = LinkedHashMap();
|
||||
LinkedHashMap<int, EnteFile> fileQueue = LinkedHashMap();
|
||||
final int _minPreviewSizeForCache = 50 * 1024 * 1024; // 50 MB
|
||||
final int _maxPreviewSizeLimitForCache = 50 * 1024 * 1024; // 50 MB
|
||||
Set<int>? _failureFiles;
|
||||
|
||||
bool _hasQueuedFile = false;
|
||||
|
||||
PreviewVideoStore._privateConstructor();
|
||||
VideoPreviewService._privateConstructor();
|
||||
|
||||
static final PreviewVideoStore instance =
|
||||
PreviewVideoStore._privateConstructor();
|
||||
static final VideoPreviewService instance =
|
||||
VideoPreviewService._privateConstructor();
|
||||
|
||||
final _logger = Logger("PreviewVideoStore");
|
||||
final cacheManager = DefaultCacheManager();
|
||||
final videoCacheManager = VideoCacheManager.instance;
|
||||
|
||||
int uploadingFileId = -1;
|
||||
|
||||
final _dio = NetworkClient.instance.enteDio;
|
||||
final _enteDio = NetworkClient.instance.enteDio;
|
||||
final _nonEnteDio = NetworkClient.instance.getDio();
|
||||
final CollectionsService collectionsService = CollectionsService.instance;
|
||||
|
||||
void init(SharedPreferences prefs) {
|
||||
_prefs = prefs;
|
||||
@@ -463,7 +466,7 @@ class PreviewVideoStore {
|
||||
},
|
||||
encryptionKey,
|
||||
);
|
||||
final _ = await _dio.put(
|
||||
final _ = await _enteDio.put(
|
||||
"/files/video-data",
|
||||
data: {
|
||||
"fileID": file.uploadedFileID!,
|
||||
@@ -482,7 +485,7 @@ class PreviewVideoStore {
|
||||
Future<(String, int)> _uploadPreviewVideo(EnteFile file, File preview) async {
|
||||
_logger.info("Pushing preview for $file");
|
||||
try {
|
||||
final response = await _dio.get(
|
||||
final response = await _enteDio.get(
|
||||
"/files/data/preview-upload-url",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID!,
|
||||
@@ -492,7 +495,7 @@ class PreviewVideoStore {
|
||||
final uploadURL = response.data["url"];
|
||||
final String objectID = response.data["objectID"];
|
||||
final objectSize = preview.lengthSync();
|
||||
final _ = await _dio.put(
|
||||
final _ = await _enteDio.put(
|
||||
uploadURL,
|
||||
data: preview.openRead(),
|
||||
options: Options(
|
||||
@@ -557,21 +560,7 @@ class PreviewVideoStore {
|
||||
size = details["size"];
|
||||
}
|
||||
} else {
|
||||
final response = await _dio.get(
|
||||
"/files/data/fetch/",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type": "vid_preview",
|
||||
},
|
||||
);
|
||||
final encryptedData = response.data["data"]["encryptedData"];
|
||||
final header = response.data["data"]["decryptionHeader"];
|
||||
final encryptionKey = getFileKey(file);
|
||||
final playlistData = await decryptAndUnzipJson(
|
||||
encryptionKey,
|
||||
encryptedData: encryptedData,
|
||||
header: header,
|
||||
);
|
||||
final Map<String, dynamic> playlistData = await _getPlaylistData(file);
|
||||
finalPlaylist = playlistData["playlist"];
|
||||
width = playlistData["width"];
|
||||
height = playlistData["height"];
|
||||
@@ -602,7 +591,7 @@ class PreviewVideoStore {
|
||||
?.file;
|
||||
if (videoFile == null) {
|
||||
previewURLResult = previewURLResult ?? await _getPreviewUrl(file);
|
||||
if (size != null && size < _minPreviewSizeForCache) {
|
||||
if (size != null && size < _maxPreviewSizeLimitForCache) {
|
||||
unawaited(
|
||||
videoCacheManager.downloadFile(
|
||||
previewURLResult.$1,
|
||||
@@ -646,6 +635,40 @@ class PreviewVideoStore {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> _getPlaylistData(EnteFile file) async {
|
||||
late Response<dynamic> response;
|
||||
if (collectionsService.isSharedPublicLink(file.collectionID!)) {
|
||||
response = await _nonEnteDio.get(
|
||||
"${Configuration.instance.getHttpEndpoint()}/public-collection/files/data/fetch/",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type": "vid_preview",
|
||||
},
|
||||
options: Options(
|
||||
headers:
|
||||
collectionsService.publicCollectionHeaders(file.collectionID!),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
response = await _enteDio.get(
|
||||
"/files/data/fetch/",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type": "vid_preview",
|
||||
},
|
||||
);
|
||||
}
|
||||
final encryptedData = response.data["data"]["encryptedData"];
|
||||
final header = response.data["data"]["decryptionHeader"];
|
||||
final encryptionKey = getFileKey(file);
|
||||
final playlistData = await decryptAndUnzipJson(
|
||||
encryptionKey,
|
||||
encryptedData: encryptedData,
|
||||
header: header,
|
||||
);
|
||||
return playlistData;
|
||||
}
|
||||
|
||||
int? parseDurationFromHLS(String playlist) {
|
||||
final lines = playlist.split("\n");
|
||||
double totalDuration = 0.0;
|
||||
@@ -667,16 +690,32 @@ class PreviewVideoStore {
|
||||
|
||||
Future<(String, String)> _getPreviewUrl(EnteFile file) async {
|
||||
try {
|
||||
final response = await _dio.get(
|
||||
"/files/data/preview",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type":
|
||||
file.fileType == FileType.video ? "vid_preview" : "img_preview",
|
||||
},
|
||||
);
|
||||
|
||||
final url = (response.data["url"] as String);
|
||||
late String url;
|
||||
if (collectionsService.isSharedPublicLink(file.collectionID!)) {
|
||||
final response = await _nonEnteDio.get(
|
||||
"${Configuration.instance.getHttpEndpoint()}/public-collection/files/data/preview",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type":
|
||||
file.fileType == FileType.video ? "vid_preview" : "img_preview",
|
||||
},
|
||||
options: Options(
|
||||
headers:
|
||||
collectionsService.publicCollectionHeaders(file.collectionID!),
|
||||
),
|
||||
);
|
||||
url = (response.data["url"] as String);
|
||||
} else {
|
||||
final response = await _enteDio.get(
|
||||
"/files/data/preview",
|
||||
queryParameters: {
|
||||
"fileID": file.uploadedFileID,
|
||||
"type":
|
||||
file.fileType == FileType.video ? "vid_preview" : "img_preview",
|
||||
},
|
||||
);
|
||||
url = (response.data["url"] as String);
|
||||
}
|
||||
final uri = Uri.parse(url);
|
||||
final segments = uri.pathSegments;
|
||||
if (segments.isEmpty) throw Exception("Invalid URL");
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import "package:photos/core/error-reporting/super_logging.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/service_locator.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import 'package:photos/theme/ente_theme.dart';
|
||||
import 'package:photos/ui/components/buttons/icon_button_widget.dart';
|
||||
import 'package:photos/ui/components/captioned_text_widget.dart';
|
||||
@@ -139,13 +139,13 @@ class AdvancedSettingsScreen extends StatelessWidget {
|
||||
singleBorderRadius: 8,
|
||||
alignCaptionedTextToLeft: true,
|
||||
trailingWidget: ToggleSwitchWidget(
|
||||
value: () => PreviewVideoStore
|
||||
value: () => VideoPreviewService
|
||||
.instance.isVideoStreamingEnabled,
|
||||
onChanged: () async {
|
||||
final isEnabled = PreviewVideoStore
|
||||
final isEnabled = VideoPreviewService
|
||||
.instance.isVideoStreamingEnabled;
|
||||
|
||||
await PreviewVideoStore.instance
|
||||
await VideoPreviewService.instance
|
||||
.setIsVideoStreamingEnabled(!isEnabled);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -20,7 +20,7 @@ import "package:photos/service_locator.dart";
|
||||
import 'package:photos/services/collections_service.dart';
|
||||
import 'package:photos/services/hidden_service.dart';
|
||||
import "package:photos/services/local_authentication_service.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import "package:photos/theme/ente_theme.dart";
|
||||
import 'package:photos/ui/collections/collection_action_sheet.dart';
|
||||
import 'package:photos/ui/notification/toast.dart';
|
||||
@@ -379,7 +379,7 @@ class FileAppBarState extends State<FileAppBar> {
|
||||
await _onTapGuestView();
|
||||
} else if (value == 99) {
|
||||
try {
|
||||
await PreviewVideoStore.instance.chunkAndUploadVideo(
|
||||
await VideoPreviewService.instance.chunkAndUploadVideo(
|
||||
context,
|
||||
widget.file,
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@ import "package:photos/models/file/extensions/file_props.dart";
|
||||
import "package:photos/models/file/file.dart";
|
||||
import "package:photos/models/preview/playlist_data.dart";
|
||||
import "package:photos/service_locator.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import "package:photos/theme/colors.dart";
|
||||
import "package:photos/ui/common/loading_widget.dart";
|
||||
import "package:photos/ui/notification/toast.dart";
|
||||
@@ -77,7 +77,7 @@ class _VideoWidgetState extends State<VideoWidget> {
|
||||
Future<void> _checkForPreview() async {
|
||||
if (!widget.file.isOwner) {
|
||||
final bool isStreamable =
|
||||
await PreviewVideoStore.instance.isSharedFileStreamble(widget.file);
|
||||
await VideoPreviewService.instance.isSharedFileStreamble(widget.file);
|
||||
if (!isStreamable && mounted) {
|
||||
isPreviewLoadable = false;
|
||||
setState(() {});
|
||||
@@ -87,7 +87,7 @@ class _VideoWidgetState extends State<VideoWidget> {
|
||||
return;
|
||||
}
|
||||
widget.playbackCallback?.call(false);
|
||||
final data = await PreviewVideoStore.instance
|
||||
final data = await VideoPreviewService.instance
|
||||
.getPlaylist(widget.file)
|
||||
.onError((error, stackTrace) {
|
||||
if (!mounted) return;
|
||||
|
||||
@@ -3,7 +3,7 @@ import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/models/ffmpeg/ffprobe_props.dart";
|
||||
import 'package:photos/models/file/file.dart';
|
||||
import "package:photos/models/file/file_type.dart";
|
||||
import "package:photos/services/preview_video_store.dart";
|
||||
import "package:photos/services/video_preview_service.dart";
|
||||
import "package:photos/theme/ente_theme.dart";
|
||||
import "package:photos/ui/components/info_item_widget.dart";
|
||||
import "package:photos/utils/standalone/data.dart";
|
||||
@@ -44,7 +44,7 @@ class _PreviewPropertiesItemWidgetState
|
||||
final textStyle = getEnteTextTheme(context).miniMuted;
|
||||
final subSectionWidgets = <Widget>[];
|
||||
|
||||
final data = await PreviewVideoStore.instance
|
||||
final data = await VideoPreviewService.instance
|
||||
.getPlaylist(widget.file)
|
||||
.onError((error, stackTrace) {
|
||||
if (!mounted) return;
|
||||
|
||||
Reference in New Issue
Block a user