재생 설정
자동 재생, 음소거, 화면비, 반복, 백그라운드 동작 등 재생 관련 옵션을 설정하는 방법입니다. 모든 옵션은 옵션 딕셔너리/JSON 최상위 키로 전달합니다.
기본 재생 옵션
VpePlayer(
accessKey: "YOUR_ACCESS_KEY",
options: [
"autostart": true, // 자동 재생
"muted": true, // 음소거 시작 (autostart 시 권장)
"aspectRatio": "16:9", // "16:9" / "16/9" / "1.78"
"objectFit": "contain", // contain·cover·fill·scale-down·stretch
"repeat": true, // 반복 재생
"playIndex": 0, // 시작 재생목록 인덱스
"startTime": 30, // 시작 위치(초)
"playlist": [["file": "https://.../master.m3u8"]]
]
)자동 재생 — iOS 정책상
autostart: true 를 사용할 때는 muted: true 를 함께 지정하는 것이 안전합니다.백그라운드 / PiP 동작
| 키 | 기본 | 설명 |
|---|---|---|
| allowsPictureInPicture | true | 백그라운드 자동 PiP |
| staysActiveInBackground | false | 백그라운드 오디오 유지 |
| autoPause | false | 백그라운드 진입 시 일시정지 (false = 계속 재생) |
| enableNowPlayingPlaybackState | true | 잠금화면 / 제어센터 Now Playing |
화면 녹화 방지
screenRecordingPrevention 을 켜면 화면 녹화/캡처를 감지해 재생을 차단합니다(E0014).
options: [
"screenRecordingPrevention": true,
"playlist": [["file": "https://.../master.m3u8"]]
]컨트롤바 / 진행바
| 키 | 기본 | 설명 |
|---|---|---|
| controls | true | 내장 컨트롤바 표시 |
| controlActiveTime | 3000 | 컨트롤 자동 숨김 시간(ms) |
| progressBarColor | – | 진행바 색상(hex) |
| touchGestures | true | 좌/우 더블탭 ±10초 시킹 |
| seekingPreview | true | SeekBar 롱프레스 프리뷰 |
전체 옵션 목록은 옵션 레퍼런스 를 참고하세요.