chore(ui): bump and migrate video_player to 2.7.0.

Signed-off-by: xsahil03x <xdsahil@gmail.com>
This commit is contained in:
Sahil Kumar
2023-06-30 14:20:40 +05:30
committed by xsahil03x
parent 5c8c4839fa
commit eddd8a3d12
3 changed files with 10 additions and 5 deletions
@@ -446,8 +446,12 @@ class VideoPackage {
}) : _showControls = showControls,
_autoInitialize = autoInitialize,
_videoPlayerController = _attachment.localUri != null
? VideoPlayerController.file(File.fromUri(_attachment.localUri!))
: VideoPlayerController.network(_attachment.assetUrl!);
? VideoPlayerController.file(
File.fromUri(_attachment.localUri!),
)
: VideoPlayerController.networkUrl(
Uri.parse(_attachment.assetUrl!),
);
final Attachment _attachment;
final bool _showControls;
@@ -382,8 +382,9 @@ class _VideoAttachmentThumbnailState extends State<_VideoAttachmentThumbnail> {
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network(widget.attachment.assetUrl!)
..initialize().then((_) {
_controller = VideoPlayerController.networkUrl(
Uri.parse(widget.attachment.assetUrl!),
)..initialize().then((_) {
// ignore: no-empty-block
setState(() {}); //when your thumbnail will show.
});
+1 -1
View File
@@ -42,7 +42,7 @@ dependencies:
synchronized: ^3.0.0
thumblr: ^0.0.4
url_launcher: ^6.1.0
video_player: ^2.4.5
video_player: ^2.7.0
video_player_macos: ^2.0.1
video_thumbnail: ^0.5.0