You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02:00
feat(mobile): add additional request headers (#10588)
* add additional request headers * improve interface * move headers under advanced settings * refactor * refactor --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/entities/store.entity.dart';
|
||||
import 'package:immich_mobile/services/api.service.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
||||
@ -26,11 +27,9 @@ Future<VideoPlayerController> videoPlayerController(
|
||||
: '$serverEndpoint/assets/${asset.remoteId}/video/playback';
|
||||
|
||||
final url = Uri.parse(videoUrl);
|
||||
final accessToken = Store.get(StoreKey.accessToken);
|
||||
|
||||
controller = VideoPlayerController.networkUrl(
|
||||
url,
|
||||
httpHeaders: {"x-immich-user-token": accessToken},
|
||||
httpHeaders: ApiService.getRequestHeaders(),
|
||||
videoPlayerOptions: asset.livePhotoVideoId != null
|
||||
? VideoPlayerOptions(mixWithOthers: true)
|
||||
: VideoPlayerOptions(mixWithOthers: false),
|
||||
|
@ -7,7 +7,7 @@ part of 'video_player_controller_provider.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$videoPlayerControllerHash() =>
|
||||
r'642469a44287188a7c301f5cad3df3e23c84d85c';
|
||||
r'84b2961cc2aeaf9d03255dbf9b9484619d0c24f5';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
Reference in New Issue
Block a user