@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
|
@@ -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.google_analytics=t())}(this,function(){"use strict";const e="play";var t;const i=((t=class GoogleAnalyticsPlugin{constructor(e){this.muted=!1,this.ga_extensions=[],this.quartiles=[0,0,0],this.ad_type="preroll",this.preroll_counter=0,this.midroll_counter=0,this.postroll_counter=0,this.event_categories={live:"Live",videos:"Videos"},this.event_actions={fullscreen_enter:"fullscreen_enter",fullscreen_exit:"fullscreen_exit",video_player_load:"video_player_load",video_start:"video_start",video_click_play:"video_click_play",video_pause:"video_pause",video_resume:"video_resume",video_seeking:"video_seeking",video_ratechange:"video_ratechange",video_qualitychange:"video_qualitychange",video_mute:"video_mute",video_unmute:"video_unmute",video_25_percent:"video_25_percent",video_50_percent:"video_50_percent",video_75_percent:"video_75_percent",video_complete:"video_complete",live_start:"live_start",live_click_play:"live_click_play",live_pause:"live_pause",live_resume:"live_resume",live_ratechange:"live_ratechange",live_seeking:"live_seeking",live_qualitychange:"live_qualitychange",live_mute:"live_mute",live_unmute:"live_unmute",live_complete:"live_complete",ad_start_preroll:"ad_start_preroll",ad_start_midroll:"ad_start_midroll",ad_start_postroll:"ad_start_postroll",ad_completed_preroll:"ad_completed_preroll",ad_completed_midroll:"ad_completed_midroll",ad_completed_postroll:"ad_completed_postroll",ad_skipped_preroll:"ad_skipped_preroll",ad_skipped_midroll:"ad_skipped_midroll",ad_skipped_postroll:"ad_skipped_postroll",ad_break_completed:"ad_break_completed"},console.warn("universal analytics by Google has been sunset, please use the ga4 plugin"),this.flowplayer=e}init(t,i,s){this.config=t,this.video=s,this.muted=s.muted,s.on(["mount","timeupdate",e,"ended","pause","playing","volumechange","ad-started","ad-completed","ad-skipped","ad-break-completed","config",e,"fullscreenenter","fullscreenexit"],e=>{switch(e.type){case"playing":this.track(t.live?this.event_actions.live_resume:this.event_actions.video_resume);break;case"pause":if(Math.abs(s.duration-s.currentTime)<1)break;this.track(t.live?this.event_actions.live_pause:this.event_actions.video_pause);break;case"play":s.hasState("is-starting")&&this.track(t.live?this.event_actions.live_start:this.event_actions.video_start),this.track(t.live?this.event_actions.live_click_play:this.event_actions.video_click_play);break;case"mount":this.track(this.event_actions.video_player_load);break;case"timeupdate":this.progress(s);break;case"ended":setTimeout(()=>{this.track(t.live?this.event_actions.live_complete:this.event_actions.video_complete),this.reset()},0);break;case"volumechange":this.volumechange(s);break;case"ad-started":this.adstarted(e);break;case"ad-completed":this.adcompleted(e);break;case"ad-break-completed":this.adbreakcompleted();break;case"config":this.configured(e.detail);break;case"fullscreenenter":this.track(this.event_actions.fullscreen_enter);break;case"fullscreenexit":this.track(this.event_actions.fullscreen_exit);break;case"ad-skipped":this.adskipped()}})}setup_ga(e){window.ga&&!this.ga_extensions.length&&e.forEach((e,t)=>{var i;window.ga("create",e,"auto","ext"+(t+1)),(null===(i=this.config)||void 0===i?void 0:i.ga.custom_data)&&window.ga("ext"+(t+1)+".set",this.config.ga.custom_data),this.ga_extensions.push("ext"+(t+1))})}progress(e){e.opts.live||(e.currentTime/e.duration>.25&&0===this.quartiles[0]?(this.quartiles[0]=1,this.track(this.event_actions.video_25_percent)):e.currentTime/e.duration>.5&&0===this.quartiles[1]?(this.quartiles[1]=1,this.track(this.event_actions.video_50_percent)):e.currentTime/e.duration>.75&&0===this.quartiles[2]&&(this.quartiles[2]=1,this.track(this.event_actions.video_75_percent)))}volumechange(e){this.muted!==e.muted&&(this.muted=e.muted,e.muted?this.track(e.opts.live?this.event_actions.live_mute:this.event_actions.video_mute):this.track(e.opts.live?this.event_actions.live_unmute:this.event_actions.video_unmute))}reset(){this.quartiles=[0,0,0],this.preroll_counter=0,this.midroll_counter=0,this.postroll_counter=0}configured(e){var t,i;(null===(t=null==e?void 0:e.ga)||void 0===t?void 0:t.event_actions)&&(this.event_actions=e.ga.event_actions),(null===(i=null==e?void 0:e.ga)||void 0===i?void 0:i.event_categories)&&(this.event_categories=e.ga.event_categories)}checkForAdCounter(e,t){return e.replace("[x]",t+"")}adstarted(e){var t;switch((null===(t=e.data)||void 0===t?void 0:t.ad_type)||"preroll"){case"midroll":this.ad_type="midroll",this.midroll_counter++,this.track(this.checkForAdCounter(this.event_actions.ad_start_midroll,this.midroll_counter));break;case"postroll":this.ad_type="postroll",this.postroll_counter++,this.track(this.checkForAdCounter(this.event_actions.ad_start_postroll,this.postroll_counter));break;default:this.ad_type="preroll",this.preroll_counter++,this.track(this.checkForAdCounter(this.event_actions.ad_start_preroll,this.preroll_counter))}}adcompleted(e){var t;switch((null===(t=e.data)||void 0===t?void 0:t.ad_type)||"preroll"){case"midroll":this.track(this.event_actions.ad_completed_midroll);break;case"postroll":this.track(this.event_actions.ad_completed_postroll);break;default:this.track(this.event_actions.ad_completed_preroll)}}adskipped(){if(this.ad_type)switch(this.ad_type){case"midroll":this.track(this.event_actions.ad_skipped_midroll);break;case"postroll":this.track(this.event_actions.ad_skipped_postroll);break;default:this.track(this.event_actions.ad_skipped_preroll)}else this.track(this.event_actions.ad_skipped_preroll)}adbreakcompleted(){this.track(this.event_actions.ad_break_completed)}pushToDataLayer(e,t,i){var s;if(window.dataLayer)try{window.dataLayer.push({event:"Flowplayer",video_name:i,action:e,category:t,duration:null===(s=this.video)||void 0===s?void 0:s.duration})}catch(e){}}track(e){var t,i,s,a,o;if(!this.config||!this.config.ga||!e||(null===(t=null==this?void 0:this.video)||void 0===t?void 0:t.hasState("consent-no-tracking")))return;const l=(null===(i=this.video)||void 0===i?void 0:i.opts.live)?this.event_categories.live:this.event_categories.videos,r=null===(s=this.config.ga)||void 0===s?void 0:s.ga_instances,n=(null===(a=null==this?void 0:this.config)||void 0===a?void 0:a.title)||(null===(o=this.config.metadata)||void 0===o?void 0:o.title)||"unknown video";return this.config.ga.data_layer_tracking?this.pushToDataLayer(e,l,n):(this.setup_ga(r),this.ga_extensions.length&&void 0!==window.ga&&null!==window.ga?void this.ga_extensions.forEach(t=>{window.ga(t+".send","event",l,e,n)}):console.debug("ga console.send","event",l,e,n))}}).pluginName="ga",t);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 i=e.flowplayer;return"function"==typeof i?(i(t),t):(Array.isArray(i.extensions)||(i.extensions=[]),~i.extensions.indexOf(t)||i.extensions.push(t),t)}(window,i)});
|