Skip to content

Commit f985099

Browse files
authored
Merge pull request #143 from amitamrutiya2210/issue-143-multiple-video-formate
add multiple formate video and audio in video stream screen
2 parents ec40ebc + 7b269bc commit f985099

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/Components/torrent_content_tile.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ class _TorrentFileTileState extends State<TorrentFileTile> {
130130
},
131131
onTap: () {
132132
String fileType = widget.model.filename.split('.').last;
133-
if (fileType == 'mp4') {
133+
if (fileType == 'mp4' ||
134+
fileType == 'mkv' ||
135+
fileType == 'webm' ||
136+
fileType == 'mov' ||
137+
fileType == 'mp3' ||
138+
fileType == 'wav') {
134139
Navigator.of(context).pushNamed(
135140
Routes.streamVideoScreenRoute,
136141
arguments: VideoStreamScreenArguments(

lib/Model/torrent_content_model.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ class TorrentContentModel {
3232
depth: json['path'].split('/').length,
3333
parentPath: json['path'].split('/'),
3434
isMediaFile: (json['filename'].split('.').last == 'mp3' ||
35-
json['filename'].split('.').last == 'mp4'),
35+
json['filename'].split('.').last == 'wav' ||
36+
json['filename'].split('.').last == 'mp4' ||
37+
json['filename'].split('.').last == 'mkv' ||
38+
json['filename'].split('.').last == 'mov' ||
39+
json['filename'].split('.').last == 'webm'),
3640
);
3741
}
3842
}

0 commit comments

Comments
 (0)