feat(p2v): 무빙 포스터·롱컷 통합 및 상세·소셜 기능 연결
This commit is contained in:
1 parent
cd71f6d9d3
commit
c06018d88c
42 files changed
+3020
-1610
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import type { ContentType } from '../types/api';
|
||||
|
||||
/**
|
||||
* 기기의 네이티브 공유 시트를 열고 요청을 처리했는지 반환합니다.
|
||||
*
|
||||
@@ -32,9 +34,13 @@ export function buildVideoShareUrl(apiBaseUrl: string, videoId: number | string)
|
||||
export function buildContentShareUrl(
|
||||
apiBaseUrl: string,
|
||||
contentId: number | string,
|
||||
contentType: 'video' | 'ssul' = 'video',
|
||||
contentType: ContentType = 'video',
|
||||
): string {
|
||||
const base = apiBaseUrl.replace(/\/$/, '');
|
||||
if (contentType === 'p2v_video' || contentType === 'p2v_playreel') {
|
||||
const kind = contentType === 'p2v_video' ? 'f1' : 'playreel';
|
||||
return `${base}/p2v/${kind}/share/${encodeURIComponent(String(contentId))}`;
|
||||
}
|
||||
if (contentType === 'ssul') {
|
||||
return `${base}/ssul/share/${encodeURIComponent(String(contentId))}`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user