@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.
Files changed (95) hide show
  1. package/core.js +1 -1
  2. package/default.js +1 -1
  3. package/embed.js +2 -2
  4. package/package.json +1 -2364
  5. package/plugins/ads.js +1 -1
  6. package/plugins/analytics.js +1 -1
  7. package/plugins/rts.js +1 -1
  8. package/plugins/ssai.js +1 -1
  9. package/package/core/events.d.ts +0 -710
  10. package/package/core/events.js +0 -403
  11. package/package/core.js +0 -1
  12. package/package/default.js +0 -1
  13. package/package/embed.js +0 -7
  14. package/package/flowplayer.css +0 -1
  15. package/package/index.d.ts +0 -2238
  16. package/package/plugins/ads.d.ts +0 -4468
  17. package/package/plugins/ads.js +0 -7
  18. package/package/plugins/airplay.d.ts +0 -2152
  19. package/package/plugins/airplay.js +0 -1
  20. package/package/plugins/analytics.d.ts +0 -2146
  21. package/package/plugins/analytics.js +0 -1
  22. package/package/plugins/asel.d.ts +0 -2293
  23. package/package/plugins/asel.js +0 -1
  24. package/package/plugins/audio.d.ts +0 -2146
  25. package/package/plugins/audio.js +0 -1
  26. package/package/plugins/chapters.d.ts +0 -2155
  27. package/package/plugins/chapters.js +0 -1
  28. package/package/plugins/chromecast.d.ts +0 -2221
  29. package/package/plugins/chromecast.js +0 -1
  30. package/package/plugins/comscore.d.ts +0 -2146
  31. package/package/plugins/comscore.js +0 -1
  32. package/package/plugins/consent.d.ts +0 -2194
  33. package/package/plugins/consent.js +0 -1
  34. package/package/plugins/context-menu.d.ts +0 -2160
  35. package/package/plugins/context-menu.js +0 -1
  36. package/package/plugins/cuepoints.d.ts +0 -2270
  37. package/package/plugins/cuepoints.js +0 -1
  38. package/package/plugins/dash.d.ts +0 -2302
  39. package/package/plugins/dash.js +0 -2
  40. package/package/plugins/drm.d.ts +0 -2271
  41. package/package/plugins/drm.js +0 -1
  42. package/package/plugins/endscreen.d.ts +0 -2165
  43. package/package/plugins/endscreen.js +0 -1
  44. package/package/plugins/fas.d.ts +0 -2200
  45. package/package/plugins/fas.js +0 -1
  46. package/package/plugins/float-on-scroll.d.ts +0 -2234
  47. package/package/plugins/float-on-scroll.js +0 -1
  48. package/package/plugins/ga4.d.ts +0 -2146
  49. package/package/plugins/ga4.js +0 -1
  50. package/package/plugins/gemius.d.ts +0 -2171
  51. package/package/plugins/gemius.js +0 -1
  52. package/package/plugins/google-analytics.d.ts +0 -2146
  53. package/package/plugins/google-analytics.js +0 -1
  54. package/package/plugins/hls.d.ts +0 -2271
  55. package/package/plugins/hls.js +0 -1
  56. package/package/plugins/id3.d.ts +0 -2212
  57. package/package/plugins/id3.js +0 -1
  58. package/package/plugins/iframe.d.ts +0 -2147
  59. package/package/plugins/iframe.js +0 -1
  60. package/package/plugins/keyboard.d.ts +0 -2146
  61. package/package/plugins/keyboard.js +0 -1
  62. package/package/plugins/media-session.d.ts +0 -2146
  63. package/package/plugins/media-session.js +0 -1
  64. package/package/plugins/message.d.ts +0 -2205
  65. package/package/plugins/message.js +0 -1
  66. package/package/plugins/ovp.d.ts +0 -2208
  67. package/package/plugins/ovp.js +0 -1
  68. package/package/plugins/playlist.d.ts +0 -2465
  69. package/package/plugins/playlist.js +0 -1
  70. package/package/plugins/preview.d.ts +0 -2236
  71. package/package/plugins/preview.js +0 -1
  72. package/package/plugins/qsel.d.ts +0 -2236
  73. package/package/plugins/qsel.js +0 -1
  74. package/package/plugins/qul.d.ts +0 -2161
  75. package/package/plugins/qul.js +0 -1
  76. package/package/plugins/rts.d.ts +0 -2551
  77. package/package/plugins/rts.js +0 -25
  78. package/package/plugins/share.d.ts +0 -2181
  79. package/package/plugins/share.js +0 -1
  80. package/package/plugins/speed.d.ts +0 -2173
  81. package/package/plugins/speed.js +0 -1
  82. package/package/plugins/ssai.d.ts +0 -2502
  83. package/package/plugins/ssai.js +0 -7
  84. package/package/plugins/subtitles.d.ts +0 -2287
  85. package/package/plugins/subtitles.js +0 -1
  86. package/package/plugins/thumbnails.d.ts +0 -2164
  87. package/package/plugins/thumbnails.js +0 -1
  88. package/package/plugins/tizen.d.ts +0 -2152
  89. package/package/plugins/tizen.js +0 -1
  90. package/package/plugins/vtsel.d.ts +0 -2250
  91. package/package/plugins/vtsel.js +0 -1
  92. package/package/plugins/webos.d.ts +0 -2152
  93. package/package/plugins/webos.js +0 -1
  94. package/package/util/loader.d.ts +0 -2163
  95. 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.ga4=t())}(this,function(){"use strict";const e="play",t="qualitychange",i="is-ended";var a;const s=((a=class GoogleAnalytics4Plugin{constructor(e){this.muted=!1,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"},this.flowplayer=e}init(i,a,s){this.config=i,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","seeking",t,"ratechange"],e=>{var o,l,r;switch(e.type){case"playing":this.track(i.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(i.live?this.event_actions.live_pause:this.event_actions.video_pause);break;case"seeking":this.track(i.live?this.event_actions.live_seeking:this.event_actions.video_seeking);break;case"ratechange":this.track(i.live?this.event_actions.live_ratechange:this.event_actions.video_ratechange,{playbackRate:null===(o=this.video)||void 0===o?void 0:o.playbackRate});break;case t:{const t=e.detail;this.track(i.live?this.event_actions.live_qualitychange:this.event_actions.video_qualitychange,{before:null===(l=t.before)||void 0===l?void 0:l.height,after:null===(r=t.after)||void 0===r?void 0:r.height});break}case"play":this.play(i,a,s);break;case"mount":this.track(this.event_actions.video_player_load);break;case"timeupdate":this.progress(s);break;case"ended":setTimeout(()=>{e.defaultPrevented||(this.track(i.live?this.event_actions.live_complete:this.event_actions.video_complete),this.reset())});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()}})}play(e,t,a){const s=a.playerState;this.track(e.live?this.event_actions.live_click_play:this.event_actions.video_click_play),t.classList.contains("ad-hide-first-frame")||t.classList.contains("preroll-ios")||(s[i]||s["is-starting"])&&this.track(e.live?this.event_actions.live_start:this.event_actions.video_start,{loop:s[i]})}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.currentSrc||e.srcObject)&&(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,a){var s,o,l,r,n;const d=window.dataLayer;let c=null!==(o=null===(s=this.config)||void 0===s?void 0:s.ga.data_layers)&&void 0!==o?o:[];if(0===c.length&&d&&(c=[d]),0===c.length)return;const _=Object.assign(Object.assign({event:"flowplayer",event_action:e,event_label:i,event_category:t,duration:null===(l=this.video)||void 0===l?void 0:l.duration},null===(n=null===(r=this.config)||void 0===r?void 0:r.ga)||void 0===n?void 0:n.custom_data),a);c.forEach(e=>{if("function"==typeof e.push)try{e.push(_)}catch(t){console.error("Failed to push to dataLayer:",{dataLayer:e,error:t})}})}track(e,t){var i,a,s,o,l,r,n,d;if(!this.config||!this.config.ga||(null===(i=null==this?void 0:this.video)||void 0===i?void 0:i.hasState("consent-no-tracking")))return;const c=(null===(a=this.video)||void 0===a?void 0:a.opts.live)?this.event_categories.live:this.event_categories.videos,_=null===(s=this.config.ga)||void 0===s?void 0:s.ga_instances,v=(null===(o=null==this?void 0:this.config)||void 0===o?void 0:o.title)||(null===(l=this.config.metadata)||void 0===l?void 0:l.title)||"unknown video";if(!window.gtag||(null===(n=null===(r=this.config)||void 0===r?void 0:r.ga)||void 0===n?void 0:n.data_layer_tracking)||!_||!_.length)return this.pushToDataLayer(e,c,v,t);gtag("event",e,Object.assign(Object.assign({send_to:_,event_category:c,event_label:v,duration:null===(d=this.video)||void 0===d?void 0:d.duration},this.config.ga.custom_data),t))}}).pluginName="ga4",a);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,s)});