@sgrsoft/vpe-react-sdk 0.1.17 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  <img src="https://tkmenfxu2702.edge.naverncp.com/profile/202602/76303c7f18eb7e2e70c0e1a152419545.png" style="max-width:600px">
4
4
 
5
- React 19/Vite 기반 Video Player Enhancement SDK입니다. `hls.js`/`dashjs`는 번들에 포함되지 않으며 외부에서 주입합니다.
5
+ React 지원하는 Video Player Enhancement SDK입니다. `hls.js`/`dashjs`는 번들에 포함되지 않으며 외부에서 주입합니다.
6
+
7
+ ## 지원 버전
8
+ - React 최소 버전: `18.0.0` (React 18.x/19.x 지원)
9
+ - Next.js 권장 버전:
10
+ - React 18 사용 시: `14.2+`
11
+ - React 19 사용 시: `15.x+`
6
12
 
7
13
  ## Modules 이용하기
8
14
 
@@ -725,6 +731,25 @@ export function App() {
725
731
  | layout | `layout(nextLayout, merge?)` | 레이아웃 변경 |
726
732
  | changeUiMode | `changeUiMode(mode)` | UI 모드 변경 |
727
733
  | changePlayMode | `changePlayMode(mode)` | 재생 모드 변경 |
734
+ | addNextSource | `addNextSource(source)` | 다음 영상 플레이리스트에 추가 |
735
+ | addPrevSource | `addPrevSource(source)` | 이전 영상 플레이리스트에 추가 |
736
+
737
+ ### addNextSource / addPrevSource
738
+ 현재 재생 중인 영상의 다음/이전 위치에 새로운 영상을 동적으로 추가합니다.
739
+
740
+ ```tsx
741
+ // 단일 영상 추가
742
+ playerRef.current?.addNextSource({
743
+ file: "https://CDN_DOMAIN/new_video.mp4",
744
+ poster: "https://CDN_DOMAIN/new_poster.jpg",
745
+ });
746
+
747
+ // 여러 영상 동시 추가
748
+ playerRef.current?.addPrevSource([
749
+ { file: "https://CDN_DOMAIN/video_1.mp4" },
750
+ { file: "https://CDN_DOMAIN/video_2.mp4" },
751
+ ]);
752
+ ```
728
753
 
729
754
  ## 이벤트
730
755
  `onEvent`로 이벤트를 수신합니다.