mirror of
https://github.com/ihmily/StreamCap.git
synced 2026-05-31 19:09:22 +08:00
feat: add preview video warning notification
This commit is contained in:
@@ -96,6 +96,9 @@ class VideoPlayer:
|
||||
sub_folder = params.get('subfolder', [''])[0]
|
||||
if filename:
|
||||
title = self._["previewing"] + ": " + (f"{sub_folder}/{filename}" if sub_folder else filename)
|
||||
if Path(filename).suffix.lower() != ".mp4":
|
||||
await self.app.snack_bar.show_snack_bar(self._["unsupported_play_on_web"])
|
||||
return
|
||||
else:
|
||||
title = self._["view_stream_source_now"]
|
||||
await self.create_video_dialog(title, source, is_file_path, room_url)
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
"empty_recording_folder": "Empty Recording Folder",
|
||||
"go_back": "Go Back",
|
||||
"previewing": "Previewing",
|
||||
"unsupported_file_type": "Unsupported file type",
|
||||
"unsupported_file_type":"⚠️ Unsupported file type",
|
||||
"no_video_file":"⚠️ No video file found",
|
||||
"no_recording_folder":"⚠️ No recording folder found",
|
||||
"copy_stream_url": "Copy Stream URL",
|
||||
@@ -351,6 +351,7 @@
|
||||
"open_live_room_page": "Open Live Room Page",
|
||||
"stream_source": "Stream Source",
|
||||
"previewing": "Previewing",
|
||||
"view_stream_source_now": "Accessing live stream source"
|
||||
"view_stream_source_now": "Accessing live stream source",
|
||||
"unsupported_play_on_web": "⚠️ Only MP4 files can be previewed on the web."
|
||||
}
|
||||
}
|
||||
@@ -341,7 +341,7 @@
|
||||
"empty_recording_folder": "录制文件夹为空,暂无录制的直播视频",
|
||||
"go_back": "返回上一级",
|
||||
"previewing": "正在预览",
|
||||
"unsupported_file_type": "不支持的文件类型",
|
||||
"unsupported_file_type":"⚠️ 不支持的文件类型",
|
||||
"no_video_file":"⚠️ 未找到视频文件",
|
||||
"no_recording_folder":"⚠️ 录制目录不存在",
|
||||
"copy_stream_url": "复制直播源地址",
|
||||
@@ -353,6 +353,7 @@
|
||||
"open_live_room_page": "打开直播间页面",
|
||||
"stream_source": "直播源",
|
||||
"previewing":"正在预览",
|
||||
"view_stream_source_now": "正在访问直播源"
|
||||
"view_stream_source_now": "正在访问直播源",
|
||||
"unsupported_play_on_web": "⚠️ Web端只支持预览MP4文件"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user