Current Path : C:/xampp/htdocs/moodle/media/player/videojs/amd/build/ |
Current File : C:/xampp/htdocs/moodle/media/player/videojs/amd/build/videojs-flash-lazy.min.js |
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}(function(a,b){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=b(require("video.js")):"function"==typeof define&&define.amd?define ("media_videojs/videojs-flash-lazy",["media_videojs/video-lazy"],b):a.videojsFlash=b(a.videojs)})(this,function(a){'use strict';a=a&&a.hasOwnProperty("default")?a["default"]:a;var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e;if("undefined"!=typeof window){e=window}else if("undefined"!=typeof d){e=d}else if("undefined"!=typeof self){e=self}else{e={}}var f=e,g=function(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}},h=function(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function, not "+_typeof(b))}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b},j=function(a,b){if(!a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return b&&("object"===_typeof(b)||"function"==typeof b)?b:a},k=a.getComponent("Tech"),l=a.dom,m=a.url,n=a.createTimeRange,o=a.mergeOptions,p=f&&f.navigator||{},q=function(a){h(b,a);function b(c,d){g(this,b);var e=j(this,a.call(this,c,d));if(c.source){e.ready(function(){this.setSource(c.source)},!0)}if(c.startTime){e.ready(function(){this.load();this.play();this.currentTime(c.startTime)},!0)}f.videojs=f.videojs||{};f.videojs.Flash=f.videojs.Flash||{};f.videojs.Flash.onReady=b.onReady;f.videojs.Flash.onEvent=b.onEvent;f.videojs.Flash.onError=b.onError;e.on("seeked",function(){this.lastSeekTarget_=void 0});return e}b.prototype.createEl=function(){var a=this.options_;if(!a.swf){a.swf="https://vjs.zencdn.net/swf/5.4.2/video-js.swf"}var c=a.techId,d=o({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.preload,loop:a.loop,muted:a.muted},a.flashVars),e=o({wmode:"opaque",bgcolor:"#000000"},a.params),f=o({id:c,name:c,class:"vjs-tech"},a.attributes);this.el_=b.embed(a.swf,d,e,f);this.el_.tech=this;return this.el_};b.prototype.play=function(){if(this.ended()){this.setCurrentTime(0)}this.el_.vjs_play()};b.prototype.pause=function(){this.el_.vjs_pause()};b.prototype.src=function(a){if(a===void 0){return this.currentSrc()}return this.setSrc(a)};b.prototype.setSrc=function(a){var b=this;a=m.getAbsoluteURL(a);this.el_.vjs_src(a);if(this.autoplay()){this.setTimeout(function(){return b.play()},0)}};b.prototype.seeking=function(){return this.lastSeekTarget_!==void 0};b.prototype.setCurrentTime=function(b){var c=this.seekable();if(c.length){b=b>c.start(0)?b:c.start(0);b=b<c.end(c.length-1)?b:c.end(c.length-1);this.lastSeekTarget_=b;this.trigger("seeking");this.el_.vjs_setProperty("currentTime",b);a.prototype.setCurrentTime.call(this)}};b.prototype.currentTime=function(){if(this.seeking()){return this.lastSeekTarget_||0}return this.el_.vjs_getProperty("currentTime")};b.prototype.currentSrc=function(){if(this.currentSource_){return this.currentSource_.src}return this.el_.vjs_getProperty("currentSrc")};b.prototype.duration=function a(){if(0===this.readyState()){return NaN}var a=this.el_.vjs_getProperty("duration");return 0<=a?a:1/0};b.prototype.load=function(){this.el_.vjs_load()};b.prototype.poster=function(){this.el_.vjs_getProperty("poster")};b.prototype.setPoster=function(){};b.prototype.seekable=function(){var a=this.duration();if(0===a){return n()}return n(0,a)};b.prototype.buffered=function(){var a=this.el_.vjs_getProperty("buffered");if(0===a.length){return n()}return n(a[0][0],a[0][1])};b.prototype.supportsFullScreen=function(){return!1};b.prototype.enterFullScreen=function(){return!1};b.prototype.getVideoPlaybackQuality=function(){var a=this.el_.vjs_getProperty("getVideoPlaybackQuality");if(f.performance&&"function"==typeof f.performance.now){a.creationTime=f.performance.now()}else if(f.performance&&f.performance.timing&&"number"==typeof f.performance.timing.navigationStart){a.creationTime=f.Date.now()-f.performance.timing.navigationStart}return a};return b}(k),r=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"],s=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],t=q.prototype;function b(a){var b=a.charAt(0).toUpperCase()+a.slice(1);t["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function c(a){t[a]=function(){return this.el_.vjs_getProperty(a)}}for(var u=0;u<r.length;u++){c(r[u]);b(r[u])}for(var v=0;v<s.length;v++){c(s[v])}q.isSupported=function(){if(a.browser.IS_CHROME&&(!a.browser.IS_ANDROID||!a.browser.IS_IOS)||a.browser.IS_SAFARI&&!a.browser.IS_IOS||a.browser.IS_EDGE){return!0}return 10<=q.version()[0]};k.withSourceHandlers(q);q.nativeSourceHandler={};q.nativeSourceHandler.canPlayType=function(a){if(a in q.formats){return"maybe"}return""};q.nativeSourceHandler.canHandleSource=function(a){var c;function b(a){var b=m.getFileExtension(a);if(b){return"video/"+b}return""}if(!a.type){c=b(a.src)}else{c=a.type.replace(/;.*/,"").toLowerCase()}return q.nativeSourceHandler.canPlayType(c)};q.nativeSourceHandler.handleSource=function(a,b){b.setSrc(a.src)};q.nativeSourceHandler.dispose=function(){};q.registerSourceHandler(q.nativeSourceHandler);q.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};q.onReady=function(a){var b=l.$("#"+a),c=b&&b.tech;if(c&&c.el()){q.checkReady(c)}};q.checkReady=function(a){if(!a.el()){return}if(a.el().vjs_getProperty){a.triggerReady()}else{this.setTimeout(function(){q.checkReady(a)},50)}};q.onEvent=function(a,b){var c=l.$("#"+a).tech,d=Array.prototype.slice.call(arguments,2);c.setTimeout(function(){c.trigger(b,d)},1)};q.onError=function(a,b){var c=l.$("#"+a).tech;if("srcnotfound"===b){return c.error(4)}if("string"==typeof b){c.error("FLASH: "+b)}else{b.origin="flash";c.error(b)}};q.version=function(){var a="0,0,0";try{a=new f.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{if(p.mimeTypes["application/x-shockwave-flash"].enabledPlugin){a=(p.plugins["Shockwave Flash 2.0"]||p.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(a){}}return a.split(",")};q.embed=function(a,b,c,d){var e=q.getEmbedCode(a,b,c,d),f=l.createEl("div",{innerHTML:e}).childNodes[0];return f};q.getEmbedCode=function(a,b,c,d){var e="",f="",g="";if(b){Object.getOwnPropertyNames(b).forEach(function(a){e+=a+"="+b[a]+"&"})}c=o({movie:a,flashvars:e,allowScriptAccess:"always",allowNetworking:"all"},c);Object.getOwnPropertyNames(c).forEach(function(a){f+="<param name=\""+a+"\" value=\""+c[a]+"\" />"});d=o({data:a,width:"100%",height:"100%"},d);Object.getOwnPropertyNames(d).forEach(function(a){g+=a+"=\""+d[a]+"\" "});return"<object type=\"application/x-shockwave-flash\" "+g+">"+f+"</object>"};(function(a){a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};a.streamFromParts=function(a,b){return a+"&"+b};a.streamToParts=function(a){var b={connection:"",stream:""};if(!a){return b}var c=a.search(/&(?![\w-]+=)/),d=void 0;if(-1!==c){d=c+1}else{c=d=a.lastIndexOf("/")+1;if(0===c){c=d=a.length}}b.connection=a.substring(0,c);b.stream=a.substring(d,a.length);return b};a.isStreamingType=function(b){return b in a.streamingFormats};a.RTMP_RE=/^rtmp[set]?:\/\//i;a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)};a.rtmpSourceHandler={};a.rtmpSourceHandler.canPlayType=function(b){if(a.isStreamingType(b)){return"maybe"}return""};a.rtmpSourceHandler.canHandleSource=function(b){var c=a.rtmpSourceHandler.canPlayType(b.type);if(c){return c}if(a.isStreamingSrc(b.src)){return"maybe"}return""};a.rtmpSourceHandler.handleSource=function(b,c){var d=a.streamToParts(b.src);c.setRtmpConnection(d.connection);c.setRtmpStream(d.stream)};a.registerSourceHandler(a.rtmpSourceHandler);return a})(q);if(k.getTech("Flash")){a.log.warn("Not using videojs-flash as it appears to already be registered");a.log.warn("videojs-flash should only be used with video.js@6 and above")}else{a.registerTech("Flash",q)}q.VERSION="2.2.1";return q}); //# sourceMappingURL=videojs-flash-lazy.min.js.map