UNPKG

@ktt45678/vidstack

Version:

UI component library for building high-quality, accessible video and audio experiences on the web.

2 lines (1 loc) 1.47 kB
import{a2 as n,j as o,a6 as u}from"./vidstack-B1PqmCkk.js";const s=navigator?.userAgent.toLowerCase()||"",r=/iphone|ipad|ipod|ios|crios|fxios/i.test(s),d=/(iphone|ipod)/gi.test(navigator?.platform||""),p=!!window.chrome,f=!!window.safari||r;function l(){return S()&&n(screen.orientation.unlock)}function S(){return!o(window.screen.orientation)&&!o(window.screen.orientation.lock)}function w(e,t){return e||(e=document.createElement("audio")),e.canPlayType(t).length>0}function m(e,t){return e||(e=document.createElement("video")),e.canPlayType(t).length>0}function y(e){return e||(e=document.createElement("video")),e.canPlayType("application/vnd.apple.mpegurl").length>0}function P(e){return!!document.pictureInPictureEnabled&&!e?.disablePictureInPicture}function g(e){return n(e?.webkitSupportsPresentationMode)&&n(e?.webkitSetPresentationMode)}async function v(){const e=document.createElement("video");return e.volume=.5,await u(0),e.volume===.5}function I(){return window?.ManagedMediaSource??window?.MediaSource??window?.WebKitMediaSource}function E(){return window?.SourceBuffer??window?.WebKitSourceBuffer}function a(){const e=I();if(o(e))return!1;const t=e&&n(e.isTypeSupported)&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=E(),c=o(i)||!o(i.prototype)&&n(i.prototype.appendBuffer)&&n(i.prototype.remove);return!!t&&!!c}function h(){return a()}export{d as I,p as a,r as b,l as c,v as d,w as e,m as f,a as g,P as h,h as i,g as j,y as k,f as l};