Skip to content

Commit

Permalink
fix issue #70 with videos
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienBtr committed Feb 1, 2024
1 parent fd57423 commit c334a4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions example/lib/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ List<ChatMessage> media = <ChatMessage>[
fileName: 'video.mp4',
isUploading: false,
),
ChatMedia(
url:
'https://firebasestorage.googleapis.com/v0/b/molteo-40978.appspot.com/o/chat_medias%2F2GFlPkj94hKCqonpEdf1%2F20210526_162318.mp4?alt=media&token=01b814b9-d93a-4bf1-8be1-cf9a49058f97',
type: MediaType.video,
fileName: 'video.mp4',
isUploading: false,
),
ChatMedia(
url:
'https://firebasestorage.googleapis.com/v0/b/molteo-40978.appspot.com/o/memes%2F155512641_3864499247004975_4028017188079714246_n.jpg?alt=media&token=0b335455-93ed-4529-9055-9a2c741e0189',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/message_row/media_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MediaContainer extends StatelessWidget {
return Stack(
alignment: AlignmentDirectional.bottomEnd,
children: <Widget>[
VideoPlayer(url: media.url, key: GlobalKey()),
VideoPlayer(url: media.url, key: Key(media.url)),
if (media.isUploading) loading
],
);
Expand Down

0 comments on commit c334a4e

Please sign in to comment.