Rename app to basket-utils
This commit is contained in:
+3
-3
@@ -79,7 +79,7 @@ async function runVideoExport(options, signal) {
|
||||
sleepImpl = (delay) => new Promise((resolve) => setTimeout(resolve, Math.max(0, delay))),
|
||||
isVisible = () => globalThis.document?.hidden !== true,
|
||||
FileConstructor = globalThis.File,
|
||||
fileName = 'court-lab-play.mp4',
|
||||
fileName = 'basket-utils-play.mp4',
|
||||
} = options;
|
||||
if (!canvas?.captureStream) throw new VideoExportError('이 브라우저는 캔버스 영상 생성을 지원하지 않습니다', 'capture-stream-unsupported');
|
||||
if (typeof MediaRecorderConstructor !== 'function') throw new VideoExportError('이 브라우저는 MP4 영상 생성을 지원하지 않습니다', 'media-recorder-unsupported');
|
||||
@@ -237,7 +237,7 @@ export async function shareVideoFile(file, options = {}) {
|
||||
let supported = false;
|
||||
try { supported = Boolean(navigatorObject.canShare({ files: [file] })); } catch { supported = false; }
|
||||
if (!supported) throw new VideoShareError('이 브라우저에서 MP4 파일 공유를 지원하지 않습니다. MP4를 다운로드해 카카오톡에 직접 첨부하세요.', 'file-share-unsupported');
|
||||
return navigatorObject.share({ files: [file], title: options.title || 'court.lab 전술 영상', text: options.text || '농구 전술 MP4 영상' });
|
||||
return navigatorObject.share({ files: [file], title: options.title || 'basket-utils 전술 영상', text: options.text || '농구 전술 MP4 영상' });
|
||||
}
|
||||
|
||||
export function downloadVideoFile(file, options = {}) {
|
||||
@@ -247,7 +247,7 @@ export function downloadVideoFile(file, options = {}) {
|
||||
const url = urlObject.createObjectURL(file);
|
||||
const anchor = documentObject.createElement('a');
|
||||
anchor.href = url;
|
||||
anchor.download = options.fileName || file.name || 'court-lab-play.mp4';
|
||||
anchor.download = options.fileName || file.name || 'basket-utils-play.mp4';
|
||||
anchor.click();
|
||||
setTimeout(() => urlObject.revokeObjectURL?.(url), 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user