OTT 특화 기능
인트로/오프닝/엔딩 스킵 버튼, 연령 고지, 콘텐츠 경고 등 OTT 서비스에 필요한 기능을 playlist 아이템 메타로 선언합니다.
스킵 구간 (intro / opening / ending)
해당 구간을 재생 중이면 우상단에 건너뛰기 버튼이 자동 노출되고, 탭하면 구간 끝으로 seek 합니다. start 는 "HH:MM:SS" 또는 "MM:SS", duration 은 초 단위입니다.
options: [
"playlist": [
[
"file": "https://.../master.m3u8",
"intro": ["start": "00:05", "duration": 15],
"opening": ["start": "00:30", "duration": 20],
"ending": ["start": "09:30", "duration": 30]
]
]
]연령 고지 / 콘텐츠 경고
ageRating 과 contentWarnings 를 지정하면 재생 시작 3초 후 좌상단에 고지 배너가 1회 노출됩니다. 문구는 i18n 으로 자동 번역됩니다.
options: [
"playlist": [
[
"file": "https://.../master.m3u8",
"ageRating": "15", // "all" / "12" / "15" / "19"
"contentWarnings": ["violence", "horror"]
]
]
]다음 / 이전 콘텐츠
재생목록을 여러 아이템으로 구성하면 컨트롤러 메서드로 다음/이전 콘텐츠를 전환할 수 있습니다.
player.loadPlaylist(items, startIndex: 0)
player.playNext()
player.playPrevious()
// 관찰: player.playIndex / player.currentItem