artplayer-plugin-vast@1.0.0

This commit is contained in:
Harvey Zack committed 2024-10-12 16:58:23 +08:00
1 parent 252c226473
commit edc33bb32f
7 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -5,4 +5,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,i,n,s){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof r[n]&&r[n],a=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,i){if(!a[t]){if(!e[t]){var s="function"==typeof r[n]&&r[n];if(!i&&s)return s(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var h=Error("Cannot find module '"+t+"'");throw h.code="MODULE_NOT_FOUND",h}c.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},c.cache={};var l=a[t]=new d.Module(t);e[t][0].call(l.exports,c,l,l.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=o,d.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(d,"root",{get:function(){return r[n]}}),r[n]=d;for(var h=0;h<t.length;h++)d(t[h]);if(i){var l=d(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define(function(){return l})}}({iW4Tm:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>r);var s=e("@glomex/vast-ima-player");function r(e){return async t=>{let{template:i,constructor:n}=t,{createElement:r,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,s.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new s.PlayerOptions,f=`art-${Date.now()}`,p=r("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new s.Player(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=r)},{"@glomex/vast-ima-player":"bnIjt","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bnIjt:[function(e,t,i){var n,s,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"Player",()=>eu),r.export(i,"PlayerError",()=>j),r.export(i,"PlayerEvent",()=>k),r.export(i,"PlayerOptions",()=>M),r.export(i,"loadImaSdk",()=>u);var o=null,a=function(){o=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):o||((o=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(a).catch(a),o)};function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,p(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,i){return(v=!function(){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(e,t,i){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return i&&p(s,i.prototype),s}:Reflect.construct).apply(null,arguments)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return v(e,arguments,f(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),p(i,e)})(e)}function E(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var A=0;function b(e){return"__private_"+A+++"_"+e}function g(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var O={};O.CustomEvent="function"==typeof CustomEvent?CustomEvent:function(e){return t[e]=new t("").constructor[e],t;function t(e,t)Line truncated
!function(e,t,i,n,s){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof r[n]&&r[n],a=o.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,i){if(!a[t]){if(!e[t]){var s="function"==typeof r[n]&&r[n];if(!i&&s)return s(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var h=Error("Cannot find module '"+t+"'");throw h.code="MODULE_NOT_FOUND",h}c.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},c.cache={};var l=a[t]=new d.Module(t);e[t][0].call(l.exports,c,l,l.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=o,d.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(d,"root",{get:function(){return r[n]}}),r[n]=d;for(var h=0;h<t.length;h++)d(t[h]);if(i){var l=d(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define(function(){return l})}}({iW4Tm:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i),n.export(i,"default",()=>r);var s=e("@glomex/vast-ima-player");function r(e){return async t=>{let{template:i,constructor:n}=t,{createElement:r,setStyles:o,append:a}=n.utils,{$video:u,$player:d}=i;await (0,s.loadImaSdk)();let h=window.google.ima,l=new h.AdsRenderingSettings,c=new s.PlayerOptions,f=`art-${Date.now()}`,p=r("div");a(d,p),p.id=f,o(p,{position:"absolute",inset:"0",width:"100%",height:"100%",zIndex:"150",display:"none"});let v=new s.Player(h,u,p,l,c);return"function"==typeof e&&await e({art:t,id:f,ima:h,imaPlayer:v,$container:p,playUrl:function(e){let t=new h.AdsRequest;t.adTagUrl=e,v.playAds(t)},playRes:function(e){let t=new h.AdsRequest;t.adsResponse=e,v.playAds(t)}}),{name:"artplayerPluginVast"}}}"undefined"!=typeof window&&(window.artplayerPluginVast=r)},{"@glomex/vast-ima-player":"bQPGX","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bQPGX:[function(e,t,i){var n,s,r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"Player",()=>eu),r.export(i,"PlayerError",()=>j),r.export(i,"PlayerEvent",()=>k),r.export(i,"PlayerOptions",()=>M),r.export(i,"loadImaSdk",()=>u);var o=null,a=function(){o=null},u=function(){var e=window;return e.google&&e.google.ima?Promise.resolve(e.google.ima):o||((o=new Promise(function(e,t){var i=document.createElement("script");i.async=!0,i.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",i.onload=e,i.onerror=t,document.body.appendChild(i)}).then(function(){return e.google.ima})).then(a).catch(a),o)};function d(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,i){return t&&d(e.prototype,t),i&&d(e,i),e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,p(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,i){return(v=!function(){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(e,t,i){var n=[null];n.push.apply(n,t);var s=new(Function.bind.apply(e,n));return i&&p(s,i.prototype),s}:Reflect.construct).apply(null,arguments)}function y(e){var t="function"==typeof Map?new Map:void 0;return(y=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return v(e,arguments,f(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),p(i,e)})(e)}function E(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var A=0;function b(e){return"__private_"+A+++"_"+e}function g(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var O={};O.CustomEvent="function"==typeof CustomEvent?CustomEvent:function(e){return t[e]=new t("").constructor[e],t;function t(e,t)Line truncated