21 lines
408 KiB
Text
21 lines
408 KiB
Text
|
<script is:inline>
|
||
|
// Original Source: https://hlsjs.video-dev.org/dist/hls.js
|
||
|
// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0
|
||
|
// @license-end
|
||
|
!function t(e){var i,r;i=this,r=function(){"use strict";function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)}return i}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function n(t){var e=function t(e,i){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,i||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(e)}(t,"string");return"symbol"==typeof e?e:String(e)}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function s(t,e,i){return e&&a(t.prototype,e),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(){return(l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(this,arguments)}function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function t(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function t(e,i){return e.__proto__=i,e})(t,e)}function f(t,e,i){return(f=!function t(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?function t(e,i,r){var n=[null];n.push.apply(n,i);var a=new(Function.bind.apply(e,n));return r&&h(a,r.prototype),a}:Reflect.construct.bind()).apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function t(i){if(null===i||!function t(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(i){return"function"==typeof e}}(i))return i;if("function"!=typeof i)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(i))return e.get(i);e.set(i,r)}function r(){return f(i,arguments,d(this).constructor)}return r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,i)})(t)}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i<e;i++)r[i]=t[i];return r}var g,v,m,p,y,T,x,E,S,L,A,R,_,D={exports:{}};E=D,S=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,L=/^(?=([^\/?#]*))\1([^]*)$/,A=/(?:\/|^)\.(?=\/)/g,R=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,_={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var r=_.parseURL(t);if(!r)throw Error("Error trying to parse base URL.");return r.path=_.normalizePath(r.path),_.buildURLFromParts(r)}var n=_.parseURL(e);if(!n)throw Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=_.normalizePath(n.path),_.buildURLFromParts(n)):e;var a=_.parseURL(t);if(!a)throw Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var s=L.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path="/");var o={scheme:a.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(o.netLoc=a.netLoc,"/"!==n.path[0])){if(n.path){var l=a.path,u=l.substring(0,l.lastIndex
|
||
|
|
||
|
// Original Source: https://github.com/video-dev/hls.js/blob/master/demo/basic-usage.html#L14-L36
|
||
|
var StreamPlayer = document.querySelector('.video-container > video')
|
||
|
var StreamSource = document.querySelector('.video-container > video').src
|
||
|
if (Hls.isSupported()) {
|
||
|
var hls = new Hls({
|
||
|
debug: false,
|
||
|
})
|
||
|
hls.loadSource(StreamSource)
|
||
|
hls.attachMedia(StreamPlayer)
|
||
|
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
|
||
|
StreamPlayer.muted = false
|
||
|
StreamPlayer.play()
|
||
|
})
|
||
|
}
|
||
|
</script>
|