@flowplayer/player 3.35.0-rc → 3.35.0
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/package.json +1 -2364
- package/plugins/ads.js +1 -1
- package/plugins/analytics.js +1 -1
- package/plugins/rts.js +1 -1
- package/plugins/ssai.js +1 -1
- package/package/core/events.d.ts +0 -710
- package/package/core/events.js +0 -403
- package/package/core.js +0 -1
- package/package/default.js +0 -1
- package/package/embed.js +0 -7
- package/package/flowplayer.css +0 -1
- package/package/index.d.ts +0 -2238
- package/package/plugins/ads.d.ts +0 -4468
- package/package/plugins/ads.js +0 -7
- package/package/plugins/airplay.d.ts +0 -2152
- package/package/plugins/airplay.js +0 -1
- package/package/plugins/analytics.d.ts +0 -2146
- package/package/plugins/analytics.js +0 -1
- package/package/plugins/asel.d.ts +0 -2293
- package/package/plugins/asel.js +0 -1
- package/package/plugins/audio.d.ts +0 -2146
- package/package/plugins/audio.js +0 -1
- package/package/plugins/chapters.d.ts +0 -2155
- package/package/plugins/chapters.js +0 -1
- package/package/plugins/chromecast.d.ts +0 -2221
- package/package/plugins/chromecast.js +0 -1
- package/package/plugins/comscore.d.ts +0 -2146
- package/package/plugins/comscore.js +0 -1
- package/package/plugins/consent.d.ts +0 -2194
- package/package/plugins/consent.js +0 -1
- package/package/plugins/context-menu.d.ts +0 -2160
- package/package/plugins/context-menu.js +0 -1
- package/package/plugins/cuepoints.d.ts +0 -2270
- package/package/plugins/cuepoints.js +0 -1
- package/package/plugins/dash.d.ts +0 -2302
- package/package/plugins/dash.js +0 -2
- package/package/plugins/drm.d.ts +0 -2271
- package/package/plugins/drm.js +0 -1
- package/package/plugins/endscreen.d.ts +0 -2165
- package/package/plugins/endscreen.js +0 -1
- package/package/plugins/fas.d.ts +0 -2200
- package/package/plugins/fas.js +0 -1
- package/package/plugins/float-on-scroll.d.ts +0 -2234
- package/package/plugins/float-on-scroll.js +0 -1
- package/package/plugins/ga4.d.ts +0 -2146
- package/package/plugins/ga4.js +0 -1
- package/package/plugins/gemius.d.ts +0 -2171
- package/package/plugins/gemius.js +0 -1
- package/package/plugins/google-analytics.d.ts +0 -2146
- package/package/plugins/google-analytics.js +0 -1
- package/package/plugins/hls.d.ts +0 -2271
- package/package/plugins/hls.js +0 -1
- package/package/plugins/id3.d.ts +0 -2212
- package/package/plugins/id3.js +0 -1
- package/package/plugins/iframe.d.ts +0 -2147
- package/package/plugins/iframe.js +0 -1
- package/package/plugins/keyboard.d.ts +0 -2146
- package/package/plugins/keyboard.js +0 -1
- package/package/plugins/media-session.d.ts +0 -2146
- package/package/plugins/media-session.js +0 -1
- package/package/plugins/message.d.ts +0 -2205
- package/package/plugins/message.js +0 -1
- package/package/plugins/ovp.d.ts +0 -2208
- package/package/plugins/ovp.js +0 -1
- package/package/plugins/playlist.d.ts +0 -2465
- package/package/plugins/playlist.js +0 -1
- package/package/plugins/preview.d.ts +0 -2236
- package/package/plugins/preview.js +0 -1
- package/package/plugins/qsel.d.ts +0 -2236
- package/package/plugins/qsel.js +0 -1
- package/package/plugins/qul.d.ts +0 -2161
- package/package/plugins/qul.js +0 -1
- package/package/plugins/rts.d.ts +0 -2551
- package/package/plugins/rts.js +0 -25
- package/package/plugins/share.d.ts +0 -2181
- package/package/plugins/share.js +0 -1
- package/package/plugins/speed.d.ts +0 -2173
- package/package/plugins/speed.js +0 -1
- package/package/plugins/ssai.d.ts +0 -2502
- package/package/plugins/ssai.js +0 -7
- package/package/plugins/subtitles.d.ts +0 -2287
- package/package/plugins/subtitles.js +0 -1
- package/package/plugins/thumbnails.d.ts +0 -2164
- package/package/plugins/thumbnails.js +0 -1
- package/package/plugins/tizen.d.ts +0 -2152
- package/package/plugins/tizen.js +0 -1
- package/package/plugins/vtsel.d.ts +0 -2250
- package/package/plugins/vtsel.js +0 -1
- package/package/plugins/webos.d.ts +0 -2152
- package/package/plugins/webos.js +0 -1
- package/package/util/loader.d.ts +0 -2163
- package/package/util/loader.js +0 -63
package/package/plugins/drm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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.drm=t())}(this,function(){"use strict";const e="com.widevine.alpha",t="com.microsoft.playready",n="org.w3.clearkey",r="com.apple.fps.1_0",s="license_server",o="http_headers",i="certificate",a="vendor",c="query_params";var d=Object.freeze({__proto__:null,WIDEVINE:e,PLAYREADY:t,CLEARKEY:n,FAIRPLAY:r,LICENSE_SERVER:s,HTTP_HEADERS:o,CERTIFICATE:i,VENDOR:a,REQUEST_MEDIA_KEY_SYSTEM_ACCESS_FUNCTION:"request_media_key_system_access_function",QUERY_PARAMS:c,KEY:"key",KEY_ID:"kid"});function u(){const e="undefined"!=typeof document&&"undefined"!=typeof window,t=e?navigator.userAgent:"",n=/iP(hone|od)/i.test(t)&&!/iPad/.test(t)&&!/IEMobile/i.test(t),r=/Android/.test(t)&&!/Firefox/.test(t),s=/^((?!chrome|android).)*safari/i.test(t),o=/chrome|crios/i.test(t)&&!/opr|opera|chromium|edg|ucbrowser|googlebot/i.test(t),i=/firefox|fxios/i.test(t)&&!/seamonkey/i.test(t),a=/edg/i.test(t),c=/opr|opera/i.test(t),d=/SamsungBrowser/.test(t),u=d&&/SMART-TV/.test(t);return{controls:!n,video:function(t){return e&&document.createElement("video").canPlayType(t)},lang:e&&window.navigator.language,android:r,iphone:n,safari:s,edge:a,opera:c,chrome:o,firefox:i,ios:e&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,samsung:d,samsung_tv:d&&u,touch:"ontouchstart"in window,tizen:"tizen"in window,webOS:"webos"in window}}function f(s){const o={};return Object.keys(s).forEach(function(i){(function(s){const o=u();switch(s){case e:return o.chrome||o.firefox||o.edge||o.opera;case n:return o.chrome||o.firefox;case r:return o.safari;case t:return o.edge}})(i)&&function(e,t,n){Object.assign(n,t),n.emeEnabled=!0,t.request_media_key_system_access_function&&(n.requestMediaKeySystemAccessFunc=t.request_media_key_system_access_function);const s=t.http_headers;s&&(n.licenseXhrSetup=function(e){Object.keys(s).forEach(function(t){e.setRequestHeader(t,s[t])})}),n.drmSystems=n.drmSystems||{},Object.assign(n.drmSystems,{[e===r?"com.apple.fps":e]:{licenseUrl:t.license_server,serverCertificateUrl:t.certificate}})}(i,s[i],o)}),o}function l(r){const i={};return Object.keys(r).forEach(function(a){(function(r){const s=u();switch(r){case e:return s.chrome||s.firefox||s.edge||s.opera;case n:return s.chrome||s.firefox;case t:return s.edge}})(a)&&(i[a]=function(e){return Object.assign({serverURL:e[s],httpRequestHeaders:e[o]},e)}(r[a]))}),i}const y=(e,t)=>fetch(e,t).then(h).then(e=>new Uint8Array(e)),h=e=>{if(e.ok)return e.arrayBuffer();throw m(e)},m=e=>new Error(`http:error status=${e.status} during key retrieval`);var p=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{y(e).then(t)},fairplay_request_license:function(e,t,n){const r=((e,t)=>e.includes(t.assetId)&&Object.keys(t.queryParams||{}).find(t=>e.includes(t))?e:e.includes(t.assetId)?`${e}?${new URLSearchParams(t.queryParams).toString()}`:`${e}/${t.assetId}?${new URLSearchParams(t.queryParams).toString()}`)(e,t);y(r,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:t.message}).then(n)}});var _,g=Object.freeze({__proto__:null,fairplay_fetch_certificate:(e,t)=>{y(e).then(t)},fairplay_request_license:function(e,t,n){const r=new FormData;var s;r.set("assetid",t.assetId),r.set("spc",(s=t.message,btoa(Array.prototype.map.call(s,function(e){return String.fromCharCode(e)}).join("")))),fetch(e,{method:"POST",body:r,headers:t.headers}).then(e=>{if(e.ok)return e.text();throw m(e)}).then(e=>function(e){const t=atob(e),n=new Uint8Array(t.length);return Array.prototype.forEach.call(t,function(e,t){n[t]=e.charCodeAt(0)}),n}(e)).then(n)}}),w=Object.freeze({__proto__:null,ezdrm:p,buydrm:g});function b(e,t,n){const d=t[r],u=null==d?void 0:d[i];if(!d||!u)return;if(e.src&&0===e.src.indexOf("blob:"))return;const f=d[a]||"ezdrm",l="string"==typeof f?w[f]:f;l.fairplay_fetch_certificate(u,function(i){e.webkitSetMediaKeys(new window.WebKitMediaKeys(r));const a=n.initData,u=function(e){const t=function(e){const t=new Uint16Array(e);return String.fromCharCode(...t)}(e.buffer);return t.substring(t.indexOf("skd:")+6).split(";").pop()}(a);if(!u)return console.debug("flowplayer::drm::fairplay - unable to extract content id from init data");const f=function(e,t,n){"string"==typeof t&&(t=function(e){const t=new ArrayBuffer(2*e.length),n=new Uint16Array(t);return Array(...Array(e.length)).map((e,t)=>t).forEach(t=>{n[t]=e.charCodeAt(t)}),n}(t));let r=0;const s=new ArrayBuffer(e.byteLength+4+t.byteLength+4+n.byteLength),o=new DataView(s),i=new Uint8Array(s,r,e.byteLength);i.set(e),r+=e.byteLength,o.setUint32(r,t.byteLength,!0),r+=4;const a=new Uint16Array(s,r,t.length);a.set(t),r+=a.byteLength,o.setUint32(r,n.byteLength,!0),r+=4;return new Uint8Array(s,r,n.byteLength).set(n),new Uint8Array(s,0,s.byteLength)}(a,u,i),y=e.webkitKeys.createSession("application/x-mpegurl",f);y.addEventListener("webkitkeyerror",console.debug.bind(console,"webkitkeyerror")),y.addEventListener("webkitkeymessage",function(e){const n={message:e.message,assetId:u,headers:d[o]||{},queryParams:t[r][c]||{}};l.fairplay_request_license(d[s],n,e=>y.update(e))})})}const A=((_=class DRM{init(e,t,n){let r;n.on("webkitneedkey",e=>b(n,r.drm||{},e)),n.on("src",t=>{r=t.detail,function(e){var t,n,r,s,o;null===(t=e.hls)||void 0===t||delete t.drmSystems,null===(n=e.hls)||void 0===n||delete n.licenseXhrSetup,null===(r=e.hls)||void 0===r||delete r.requestMediaKeySystemAccessFunc,null===(s=e.hls)||void 0===s||delete s.drmSystemOptions,null===(o=e.hls)||void 0===o||delete o.emeEnabled}(e),this.hls_drm(n,e,t.detail.drm),this.dash_drm(n,e,t.detail.drm)})}hls_drm(e,t,n){if(!n)return;const r=f(n);e.setOpts({hls:Object.assign(t.hls||{},r)})}dash_drm(e,t,n){if(!n)return;const r=t.dash||{},s=l(n);e.setOpts({dash:Object.assign(r,{drm:s})})}}).pluginName="drm",_);Object.assign(A,d);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 n=e.flowplayer;return"function"==typeof n?(n(t),t):(Array.isArray(n.extensions)||(n.extensions=[]),~n.extensions.indexOf(t)||n.extensions.push(t),t)}(window,A)});
|