ReactAllPlayer

1 min read Original article ↗
PropTypeDescriptionDefaultRequired
sourcesSource[]An array of sources contain file, label and typenulltrue
subtitlesSubtitle[]An array of subtitles contain file, lang and languagenullfalse
hlsRefReact.MutableRefObject<Hls | null>hls.js instance refReact.createRef()false
dashRefReact.MutableRefObject<DashJS.MediaPlayerClass | null>dashjs instance refReact.createRef()false
hlsConfigHls["config"]hls.js config{}false
changeSourceUrl(currentSourceUrl: string, source: Source) => stringA function that modify given source url (hls only)() => nullfalse
onHlsInit(hls: Hls) => voidCalled after hls.js initialization() => nullfalse
onDashInit(dash: DashJS.MediaPlayerClass) => voidCalled after dashjs initialization() => nullfalse
onInit(videoEl: HTMLVideoElement) => voidCalled after video initialization() => nullfalse
refReact.MutableRefObject<HTMLVideoElement | null>video element refnullfalse
i18nI18nTranslationsDefault Translationsfalse
hotkeysHotkey[]Hotkeys (shortcuts)Default Hotkeysfalse
componentsComponent[]Customization componentsDefault componentsfalse
thumbnailstringThumbnails on progress bar hovernullfalse
posterstringVideo poster image on loadnullfalse