본문으로 건너뛰기

플레이리스트

플레이리스트 생성·조회·아이템 관리 모두 SDK 메서드로 동작합니다. 생성/수정은 앱 멤버 JWT 가 필요합니다.

SDK 메서드백엔드
createPlaylist(channelId, data)POST /v1/public/playlists (body 에 channel_id)
getPlaylists(channelId)GET /v1/public/playlists/public?channel_id= (채널 공개 목록)
getPlaylistItems(playlistId)GET /v1/public/playlists/:id 응답의 items
addToPlaylist / removeFromPlaylistPOST/DELETE /v1/public/playlists/:id/items

생성 · 조회

typescript
// 생성 (앱 멤버 JWT 필요)
const playlist = await cb.video.createPlaylist('channel-id', {
    title: '내 플레이리스트',
    description: '설명',
    visibility: 'public',
})

// 채널의 공개 플레이리스트 목록
const playlists = await cb.video.getPlaylists('channel-id')

// 플레이리스트 아이템 조회
const items = await cb.video.getPlaylistItems(playlist.id)

비디오 추가 / 제거

typescript
// 추가 (마지막 위치)
const item = await cb.video.addToPlaylist('playlist-id', 'video-id')

// 특정 위치에 삽입
await cb.video.addToPlaylist('playlist-id', 'video-id', 3)

// 제거 (item ID 기반)
await cb.video.removeFromPlaylist('playlist-id', item.id)