@flowplayer/player 3.34.3 → 3.35.0-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/package/core/events.d.ts +710 -0
- package/package/core/events.js +403 -0
- package/package/core.js +1 -0
- package/package/default.js +1 -0
- package/package/embed.js +7 -0
- package/package/flowplayer.css +1 -0
- package/package/index.d.ts +2238 -0
- package/package/plugins/ads.d.ts +4468 -0
- package/package/plugins/ads.js +7 -0
- package/package/plugins/airplay.d.ts +2152 -0
- package/package/plugins/airplay.js +1 -0
- package/package/plugins/analytics.d.ts +2146 -0
- package/package/plugins/analytics.js +1 -0
- package/package/plugins/asel.d.ts +2293 -0
- package/package/plugins/asel.js +1 -0
- package/package/plugins/audio.d.ts +2146 -0
- package/package/plugins/audio.js +1 -0
- package/package/plugins/chapters.d.ts +2155 -0
- package/package/plugins/chapters.js +1 -0
- package/package/plugins/chromecast.d.ts +2221 -0
- package/package/plugins/chromecast.js +1 -0
- package/package/plugins/comscore.d.ts +2146 -0
- package/package/plugins/comscore.js +1 -0
- package/package/plugins/consent.d.ts +2194 -0
- package/package/plugins/consent.js +1 -0
- package/package/plugins/context-menu.d.ts +2160 -0
- package/package/plugins/context-menu.js +1 -0
- package/package/plugins/cuepoints.d.ts +2270 -0
- package/package/plugins/cuepoints.js +1 -0
- package/package/plugins/dash.d.ts +2302 -0
- package/package/plugins/dash.js +2 -0
- package/package/plugins/drm.d.ts +2271 -0
- package/package/plugins/drm.js +1 -0
- package/package/plugins/endscreen.d.ts +2165 -0
- package/package/plugins/endscreen.js +1 -0
- package/package/plugins/fas.d.ts +2200 -0
- package/package/plugins/fas.js +1 -0
- package/package/plugins/float-on-scroll.d.ts +2234 -0
- package/package/plugins/float-on-scroll.js +1 -0
- package/package/plugins/ga4.d.ts +2146 -0
- package/package/plugins/ga4.js +1 -0
- package/package/plugins/gemius.d.ts +2171 -0
- package/package/plugins/gemius.js +1 -0
- package/package/plugins/google-analytics.d.ts +2146 -0
- package/package/plugins/google-analytics.js +1 -0
- package/package/plugins/hls.d.ts +2271 -0
- package/package/plugins/hls.js +1 -0
- package/package/plugins/id3.d.ts +2212 -0
- package/package/plugins/id3.js +1 -0
- package/package/plugins/iframe.d.ts +2147 -0
- package/package/plugins/iframe.js +1 -0
- package/package/plugins/keyboard.d.ts +2146 -0
- package/package/plugins/keyboard.js +1 -0
- package/package/plugins/media-session.d.ts +2146 -0
- package/package/plugins/media-session.js +1 -0
- package/package/plugins/message.d.ts +2205 -0
- package/package/plugins/message.js +1 -0
- package/package/plugins/ovp.d.ts +2208 -0
- package/package/plugins/ovp.js +1 -0
- package/package/plugins/playlist.d.ts +2465 -0
- package/package/plugins/playlist.js +1 -0
- package/package/plugins/preview.d.ts +2236 -0
- package/package/plugins/preview.js +1 -0
- package/package/plugins/qsel.d.ts +2236 -0
- package/package/plugins/qsel.js +1 -0
- package/package/plugins/qul.d.ts +2161 -0
- package/package/plugins/qul.js +1 -0
- package/package/plugins/rts.d.ts +2551 -0
- package/package/plugins/rts.js +25 -0
- package/package/plugins/share.d.ts +2181 -0
- package/package/plugins/share.js +1 -0
- package/package/plugins/speed.d.ts +2173 -0
- package/package/plugins/speed.js +1 -0
- package/package/plugins/ssai.d.ts +2502 -0
- package/package/plugins/ssai.js +7 -0
- package/package/plugins/subtitles.d.ts +2287 -0
- package/package/plugins/subtitles.js +1 -0
- package/package/plugins/thumbnails.d.ts +2164 -0
- package/package/plugins/thumbnails.js +1 -0
- package/package/plugins/tizen.d.ts +2152 -0
- package/package/plugins/tizen.js +1 -0
- package/package/plugins/vtsel.d.ts +2250 -0
- package/package/plugins/vtsel.js +1 -0
- package/package/plugins/webos.d.ts +2152 -0
- package/package/plugins/webos.js +1 -0
- package/package/util/loader.d.ts +2163 -0
- package/package/util/loader.js +63 -0
- package/package.json +2364 -1
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/ovp.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/ssai.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):((e="undefined"!=typeof globalThis?globalThis:e||self).flowplayer=e.flowplayer||{},e.flowplayer.fas=t())}(this,function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var t=function(e){var t={exports:{}};return e(t,t.exports),t.exports}(function(t,r){var o,s;o=e,(s=function(e,t,r){if(!(this instanceof s))return new s(e,t,r);if(void 0===t)this.frameRate=29.97;else{if(!("number"==typeof t&&t>0))throw new Error("Number expected as framerate");this.frameRate=t}if(23.976!==this.frameRate&&24!==this.frameRate&&25!==this.frameRate&&29.97!==this.frameRate&&30!==this.frameRate&&50!==this.frameRate&&59.94!==this.frameRate&&60!==this.frameRate)throw new Error("Unsupported framerate");if(this.dropFrame="boolean"==typeof r?r:29.97===this.frameRate||59.94===this.frameRate,"number"==typeof e)this.frameCount=Math.round(e),this._frameCountToTimeCode();else if("string"==typeof e){var o=e.match("^([012]\\d):(\\d\\d):(\\d\\d)(:|;|\\.)(\\d\\d)$");if(!o)throw new Error("Timecode string expected as HH:MM:SS:FF or HH:MM:SS;FF");this.hours=parseInt(o[1]),this.minutes=parseInt(o[2]),this.seconds=parseInt(o[3]),"boolean"!=typeof r&&(this.dropFrame=":"!==o[4]),this.frames=parseInt(o[5]),this._timeCodeToFrameCount()}else if("object"==typeof e&&e instanceof Date){var i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),a=60*i.getTimezoneOffset()*1e3,n=60*e.getTimezoneOffset()*1e3;this.frameCount=Math.round((e-i+(a-n))*this.frameRate/1e3),this._frameCountToTimeCode()}else if("object"==typeof e&&e.hours>=0)this.hours=e.hours,this.minutes=e.minutes,this.seconds=e.seconds,this.frames=e.frames,this._timeCodeToFrameCount();else{if(void 0!==e)throw new Error("Timecode() constructor expects a number, timecode string, or Date()");this.frameCount=0}return this._validate(e),this}).prototype._validate=function(e){if(this.dropFrame&&29.97!==this.frameRate&&59.94!==this.frameRate)throw new Error("Drop frame is only supported for 29.97 and 59.94 fps");if(this.hours>23||this.minutes>59||this.seconds>59||this.frames>=this.frameRate||this.dropFrame&&0===this.seconds&&this.minutes%10&&this.frames<this.frameRate/29.97*2)throw new Error("Invalid timecode"+JSON.stringify(e))},s.prototype._frameCountToTimeCode=function(){var e=this.frameCount;if(this.dropFrame){var t=29.97===this.frameRate?2:4,r=Math.floor(this.frameCount/(17982*t/2)),o=this.frameCount%(17982*t/2);o<t&&(o+=t),e+=9*t*r+t*Math.floor((o-t)/(1798*t/2))}var s=Math.round(this.frameRate);this.frames=e%s,this.seconds=Math.floor(e/s)%60,this.minutes=Math.floor(e/(60*s))%60,this.hours=Math.floor(e/(3600*s))%24},s.prototype._timeCodeToFrameCount=function(){if(this.frameCount=(3600*this.hours+60*this.minutes+this.seconds)*Math.round(this.frameRate)+this.frames,this.dropFrame){var e=60*this.hours+this.minutes,t=29.97===this.frameRate?2:4;this.frameCount-=t*(e-Math.floor(e/10))}},s.prototype.toString=function(e){var t=this.frames,r="";if("string"==typeof e){if("field"!==e)throw new Error("Unsupported string format");this.frameRate<=30?r=".0":(t=Math.floor(t/2),r=".".concat((this.frameCount%2).toString()))}return"".concat(this.hours<10?"0":"",this.hours.toString(),":",this.minutes<10?"0":"",this.minutes.toString(),":",this.seconds<10?"0":"",this.seconds.toString(),this.dropFrame?";":":",t<10?"0":"",t.toString(),r)},s.prototype.valueOf=function(){return this.frameCount},s.prototype.add=function(e,t,r){if("number"!=typeof e)return e instanceof s||(e=new s(e,this.frameRate,this.dropFrame)),this.add(e.frameCount,t,r);var o=this.frameCount+Math.round(e)*(t?-1:1);if(o<0&&r>0&&(o=Math.round(86400*this.frameRate)+o)/this.frameRate/3600>r)throw new Error("Rollover arithmetic exceeds max permitted");if(o<0)throw new Error("Negative timecodes not supported");return this.frameCount=o,this.frameCount=this.frameCount%Math.round(86400*this.frameRate),this._frameCountToTimeCode(),this},s.prototype.subtract=function(e,t){return this.add(e,!0,t)},s.prototype.toDate=function(){var e=this.frameCount/this.frameRate*1e3,t=new Date;t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0);var r=new Date(t.valueOf()+e),o=60*t.getTimezoneOffset()*1e3,s=60*r.getTimezoneOffset()*1e3;return new Date(t.valueOf()+e+(s-o))},"string"!=typeof r.nodeName?t.exports=s:o&&(o.Timecode=s)});function r(e,r,o){o=o||0;const s=new Date;s.setHours(0),s.setMinutes(0),s.setSeconds(0),e=Math.max(parseFloat(e.toFixed(3))+.001+1*o/r,0),s.setMilliseconds(1e3*e);return new t(s,r).toString()}var o;const s=30,i=0,a=((o=class FAS{constructor(e,t){this.player=t,this.frame_rate=s,this.frame_offset=i}init(e,t,r){0!=r.reaper&&(r.on("loadstart",function(){r.hls&&r.setOpts({fas:{frame_offset:-1}})}),r.on("config",e=>{var t,r,o,s;this.frame_rate=(null===(r=null===(t=e.data)||void 0===t?void 0:t.fas)||void 0===r?void 0:r.frame_rate)||this.frame_rate,this.frame_offset=(null===(s=null===(o=e.data)||void 0===o?void 0:o.fas)||void 0===s?void 0:s.frame_offset)||this.frame_offset}),r.fas=this)}current_frame(){return e=r(this.player.currentTime,this.frame_rate,this.frame_offset),o=this.frame_rate,new t(e,o).frameCount;var e,o}seek_to(e){this.player.currentTime=function(e,r,o){o=o||0;const s=1*(new t(e,r).frameCount+o)/r;return Number((s+.001).toFixed(5))}(e,this.frame_rate,-this.frame_offset)}current_timecode(){return r(this.player.currentTime,this.frame_rate,this.frame_offset)}jump(e){this.seek_to(this.current_frame()+e)}}).pluginName="fas",o);return function(e,t){if("object"==typeof exports&&"undefined"!=typeof module)return t;if(null===document.currentScript)return t;"flowplayer"in e||(e.flowplayer={extensions:[]});const r=e.flowplayer;return"function"==typeof r?(r(t),t):(Array.isArray(r.extensions)||(r.extensions=[]),~r.extensions.indexOf(t)||r.extensions.push(t),t)}(window,a)});
|