import{isIOS}from"../../../../util";import PrestoPlayer from"./presto-player";import{isHLS}from"./util";export default({config:e,selector:r,src:o,preload:t})=>o&&isHLS(o)?r&&r.canPlayType("application/vnd.apple.mpegurl")&&isIOS()?createPlayer({config:e,selector:r}):import("./hls").then(l=>(0,l.default)({config:e,selector:r,src:o,preload:t})):createPlayer({config:e,selector:r});export const createPlayer=({config:e,selector:r})=>new Promise(o=>o(new PrestoPlayer(r,{...e})));