cannot share local video
This commit is contained in:
@@ -338,6 +338,7 @@
|
||||
"areYouSureToShareThisAudioToCommunity": "Are you sure to share this audio to community?",
|
||||
"shareVideo": "Share video",
|
||||
"sharedVideo": "Shared a video resource",
|
||||
"cannotShareLocalVideo": "Cannot share local video",
|
||||
"areYouSureToShareThisVideoToCommunity": "Are you sure to share this video to community?",
|
||||
"sharePrompt": "Share prompt",
|
||||
"sharedPrompt": "Shared a prompt",
|
||||
|
||||
@@ -338,6 +338,7 @@
|
||||
"areYouSureToShareThisAudioToCommunity": "您确定要分享此音频到社区吗?",
|
||||
"shareVideo": "分享视频",
|
||||
"sharedVideo": "分享了一个视频材料",
|
||||
"cannotShareLocalVideo": "无法分享本地视频",
|
||||
"areYouSureToShareThisVideoToCommunity": "您确定要分享此视频到社区吗?",
|
||||
"sharePrompt": "分享提示语",
|
||||
"sharedPrompt": "分享了一条提示语",
|
||||
|
||||
@@ -60,6 +60,14 @@ export const VideoDetail = (props: { id?: string; md5?: string }) => {
|
||||
};
|
||||
|
||||
const handleShare = async () => {
|
||||
if (!video.source.startsWith("http")) {
|
||||
toast({
|
||||
title: t("shareFailed"),
|
||||
description: t("cannotShareLocalVideo"),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!video.source && !video.isUploaded) {
|
||||
try {
|
||||
await EnjoyApp.videos.upload(video.id);
|
||||
|
||||
Reference in New Issue
Block a user