mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Implemented Video Upload and Player (#2)
* Implementing video upload features * setup image resize processor * Add video thumbnail with duration and icon * Fixed issue with video upload timeout and upper case file type on ios * Added video player page * Added video player page * Fixing video player not play on ios * Added partial file streaming for ios/android video request * Added nginx as proxy server for better file serving * update nginx and docker-compose file * Video player working correctly * Video player working correctly * Split duration to the second
This commit is contained in:
		| @@ -42,6 +42,12 @@ class _$AppRouter extends RootStackRouter { | ||||
|               imageUrl: args.imageUrl, | ||||
|               heroTag: args.heroTag, | ||||
|               thumbnailUrl: args.thumbnailUrl)); | ||||
|     }, | ||||
|     VideoViewerRoute.name: (routeData) { | ||||
|       final args = routeData.argsAs<VideoViewerRouteArgs>(); | ||||
|       return MaterialPageX<dynamic>( | ||||
|           routeData: routeData, | ||||
|           child: VideoViewerPage(key: args.key, videoUrl: args.videoUrl)); | ||||
|     } | ||||
|   }; | ||||
|  | ||||
| @@ -52,7 +58,9 @@ class _$AppRouter extends RootStackRouter { | ||||
|         RouteConfig(BackupControllerRoute.name, | ||||
|             path: '/backup-controller-page', guards: [authGuard]), | ||||
|         RouteConfig(ImageViewerRoute.name, | ||||
|             path: '/image-viewer-page', guards: [authGuard]) | ||||
|             path: '/image-viewer-page', guards: [authGuard]), | ||||
|         RouteConfig(VideoViewerRoute.name, | ||||
|             path: '/video-viewer-page', guards: [authGuard]) | ||||
|       ]; | ||||
| } | ||||
|  | ||||
| @@ -120,3 +128,27 @@ class ImageViewerRouteArgs { | ||||
|     return 'ImageViewerRouteArgs{key: $key, imageUrl: $imageUrl, heroTag: $heroTag, thumbnailUrl: $thumbnailUrl}'; | ||||
|   } | ||||
| } | ||||
|  | ||||
| /// generated route for | ||||
| /// [VideoViewerPage] | ||||
| class VideoViewerRoute extends PageRouteInfo<VideoViewerRouteArgs> { | ||||
|   VideoViewerRoute({Key? key, required String videoUrl}) | ||||
|       : super(VideoViewerRoute.name, | ||||
|             path: '/video-viewer-page', | ||||
|             args: VideoViewerRouteArgs(key: key, videoUrl: videoUrl)); | ||||
|  | ||||
|   static const String name = 'VideoViewerRoute'; | ||||
| } | ||||
|  | ||||
| class VideoViewerRouteArgs { | ||||
|   const VideoViewerRouteArgs({this.key, required this.videoUrl}); | ||||
|  | ||||
|   final Key? key; | ||||
|  | ||||
|   final String videoUrl; | ||||
|  | ||||
|   @override | ||||
|   String toString() { | ||||
|     return 'VideoViewerRouteArgs{key: $key, videoUrl: $videoUrl}'; | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user