2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
|
(function O(c,u,l){function s(i,w){if(!u[i]){if(!c[i]){var v=typeof require=="function"&&require;if(!w&&v)return v(i,!0);if(y)return y(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var d=u[i]={exports:{}};c[i][0].call(d.exports,function(h){var b=c[i][1][h];return s(b||h)},d,d.exports,O,c,u,l)}return u[i].exports}for(var y=typeof require=="function"&&require,p=0;p<l.length;p++)s(l[p]);return s})({1:[function(O,c,u){(function(l){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||typeof e!="object"&&typeof e!="function"?t:e}function p(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(u,"__esModule",{value:!0});var i=function(){function t(e,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),w=function t(e,r,n){e===null&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,r);if(o===void 0){var P=Object.getPrototypeOf(e);return P===null?void 0:t(P,r,n)}if("value"in o)return o.value;var _=o.get;if(_!==void 0)return _.call(n)},v=typeof window!="undefined"?window.videojs:l!==void 0?l.videojs:null,a=function(t){return t&&t.__esModule?t:{default:t}}(v),d=a.default.getTech("Html5"),h=a.default.mergeOptions||a.default.util.mergeOptions,b={mediaDataSource:{},config:{}},f=function(t){function e(r,n){return s(this,e),r=h(b,r),y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return p(e,t),i(e,[{key:"setSrc",value:function(r){this.flvPlayer&&(this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy());var n=this.options_.mediaDataSource,o=this.options_.config;n.type=n.type===void 0?"flv":n.type,n.url=r,this.flvPlayer=window.flvjs.createPlayer(n,o),this.flvPlayer.attachMediaElement(this.el_),this.flvPlayer.load()}},{key:"dispose",value:function(){this.flvPlayer&&(this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy()),w(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"dispose",this).call(this)}}]),e}(d);f.isSupported=function(){return window.flvjs&&window.flvjs.isSupported()},f.formats={"video/flv":"FLV","video/x-flv":"FLV"},f.canPlayType=function(t){return f.isSupported()&&t in f.formats?"maybe":""},f.canPlaySource=function(t,e){return f.canPlayType(t.type)},f.VERSION="0.2.0",a.default.registerTech("Flvjs",f),u.default=f}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}]},{},[1]);
|