@hippovideo/video-sdk 0.0.32 → 0.0.33-beta.3

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 (75) hide show
  1. package/app/{0-bundle-hippo-1akyow0x49e-0980155287759109c6ff.js → 0-bundle-hippo-nk48rou0tz-aac235d6eee8f1ef3090.js} +1 -1
  2. package/app/{0-bundle-hippo-1akyow0x49e-0980155287759109c6ff.js.gz → 0-bundle-hippo-nk48rou0tz-aac235d6eee8f1ef3090.js.gz} +0 -0
  3. package/app/{1-bundle-hippo-1akyow0x49e-ae732c26c7b8bd1f9d73.js → 1-bundle-hippo-nk48rou0tz-ae732c26c7b8bd1f9d73.js} +0 -0
  4. package/app/{1-bundle-hippo-1akyow0x49e-ae732c26c7b8bd1f9d73.js.gz → 1-bundle-hippo-nk48rou0tz-ae732c26c7b8bd1f9d73.js.gz} +0 -0
  5. package/app/{10-bundle-hippo-1akyow0x49e-2c6a14135e2d68e5eb84.js → 10-bundle-hippo-nk48rou0tz-2c6a14135e2d68e5eb84.js} +0 -0
  6. package/app/{10-bundle-hippo-1akyow0x49e-2c6a14135e2d68e5eb84.js.gz → 10-bundle-hippo-nk48rou0tz-2c6a14135e2d68e5eb84.js.gz} +0 -0
  7. package/app/{11-bundle-hippo-1akyow0x49e-e612569f22c5f2be39d7.js → 11-bundle-hippo-nk48rou0tz-e612569f22c5f2be39d7.js} +0 -0
  8. package/app/{11-bundle-hippo-1akyow0x49e-e612569f22c5f2be39d7.js.gz → 11-bundle-hippo-nk48rou0tz-e612569f22c5f2be39d7.js.gz} +0 -0
  9. package/app/{12-bundle-hippo-1akyow0x49e-36c0a5791489c8db48a0.js → 12-bundle-hippo-nk48rou0tz-e0c89132619972a8306a.js} +1 -1
  10. package/app/12-bundle-hippo-nk48rou0tz-e0c89132619972a8306a.js.gz +0 -0
  11. package/app/{13-bundle-hippo-1akyow0x49e-4cadc5a60150c48af9ec.js → 13-bundle-hippo-nk48rou0tz-4cadc5a60150c48af9ec.js} +0 -0
  12. package/app/{13-bundle-hippo-1akyow0x49e-4cadc5a60150c48af9ec.js.gz → 13-bundle-hippo-nk48rou0tz-4cadc5a60150c48af9ec.js.gz} +0 -0
  13. package/app/{14-bundle-hippo-1akyow0x49e-d4d0635a81feba3ec331.js → 14-bundle-hippo-nk48rou0tz-d4d0635a81feba3ec331.js} +0 -0
  14. package/app/{14-bundle-hippo-1akyow0x49e-d4d0635a81feba3ec331.js.gz → 14-bundle-hippo-nk48rou0tz-d4d0635a81feba3ec331.js.gz} +0 -0
  15. package/app/{15-bundle-hippo-1akyow0x49e-0396049bca6da493d2b6.js → 15-bundle-hippo-nk48rou0tz-0396049bca6da493d2b6.js} +0 -0
  16. package/app/{15-bundle-hippo-1akyow0x49e-0396049bca6da493d2b6.js.gz → 15-bundle-hippo-nk48rou0tz-0396049bca6da493d2b6.js.gz} +0 -0
  17. package/app/{16-bundle-hippo-1akyow0x49e-48baec5825f7e12f1996.js → 16-bundle-hippo-nk48rou0tz-48baec5825f7e12f1996.js} +0 -0
  18. package/app/{16-bundle-hippo-1akyow0x49e-48baec5825f7e12f1996.js.gz → 16-bundle-hippo-nk48rou0tz-48baec5825f7e12f1996.js.gz} +0 -0
  19. package/app/{17-bundle-hippo-1akyow0x49e-65158924abe83ba645c6.js → 17-bundle-hippo-nk48rou0tz-65158924abe83ba645c6.js} +0 -0
  20. package/app/{17-bundle-hippo-1akyow0x49e-65158924abe83ba645c6.js.gz → 17-bundle-hippo-nk48rou0tz-65158924abe83ba645c6.js.gz} +0 -0
  21. package/app/{18-bundle-hippo-1akyow0x49e-50e9509e26d78f21e1c5.js → 18-bundle-hippo-nk48rou0tz-50e9509e26d78f21e1c5.js} +0 -0
  22. package/app/{18-bundle-hippo-1akyow0x49e-50e9509e26d78f21e1c5.js.gz → 18-bundle-hippo-nk48rou0tz-50e9509e26d78f21e1c5.js.gz} +0 -0
  23. package/app/{19-bundle-hippo-1akyow0x49e-90d4450b876ba29a030e.js → 19-bundle-hippo-nk48rou0tz-90d4450b876ba29a030e.js} +0 -0
  24. package/app/{19-bundle-hippo-1akyow0x49e-90d4450b876ba29a030e.js.gz → 19-bundle-hippo-nk48rou0tz-90d4450b876ba29a030e.js.gz} +0 -0
  25. package/app/{2-bundle-hippo-1akyow0x49e-a49a4e1c8245c01b5f05.js → 2-bundle-hippo-nk48rou0tz-a49a4e1c8245c01b5f05.js} +0 -0
  26. package/app/{2-bundle-hippo-1akyow0x49e-a49a4e1c8245c01b5f05.js.gz → 2-bundle-hippo-nk48rou0tz-a49a4e1c8245c01b5f05.js.gz} +0 -0
  27. package/app/{20-bundle-hippo-1akyow0x49e-37a726ea08be2181056d.js → 20-bundle-hippo-nk48rou0tz-37a726ea08be2181056d.js} +0 -0
  28. package/app/{20-bundle-hippo-1akyow0x49e-37a726ea08be2181056d.js.gz → 20-bundle-hippo-nk48rou0tz-37a726ea08be2181056d.js.gz} +0 -0
  29. package/app/{21-bundle-hippo-1akyow0x49e-bf109fa22fd701f0c3b4.js → 21-bundle-hippo-nk48rou0tz-bf109fa22fd701f0c3b4.js} +0 -0
  30. package/app/{21-bundle-hippo-1akyow0x49e-bf109fa22fd701f0c3b4.js.gz → 21-bundle-hippo-nk48rou0tz-bf109fa22fd701f0c3b4.js.gz} +0 -0
  31. package/app/{22-bundle-hippo-1akyow0x49e-1645557d5f09d84a6630.js → 22-bundle-hippo-nk48rou0tz-1645557d5f09d84a6630.js} +0 -0
  32. package/app/{22-bundle-hippo-1akyow0x49e-1645557d5f09d84a6630.js.gz → 22-bundle-hippo-nk48rou0tz-1645557d5f09d84a6630.js.gz} +0 -0
  33. package/app/{23-bundle-hippo-1akyow0x49e-e3d25f48ae72b8e1d45e.js → 23-bundle-hippo-nk48rou0tz-e3d25f48ae72b8e1d45e.js} +0 -0
  34. package/app/{23-bundle-hippo-1akyow0x49e-e3d25f48ae72b8e1d45e.js.gz → 23-bundle-hippo-nk48rou0tz-e3d25f48ae72b8e1d45e.js.gz} +0 -0
  35. package/app/{24-bundle-hippo-1akyow0x49e-eba799e8893c67ae5ea1.js → 24-bundle-hippo-nk48rou0tz-eba799e8893c67ae5ea1.js} +0 -0
  36. package/app/{24-bundle-hippo-1akyow0x49e-eba799e8893c67ae5ea1.js.gz → 24-bundle-hippo-nk48rou0tz-eba799e8893c67ae5ea1.js.gz} +0 -0
  37. package/app/{25-bundle-hippo-1akyow0x49e-62cde6a9726143e17ba8.js → 25-bundle-hippo-nk48rou0tz-62cde6a9726143e17ba8.js} +0 -0
  38. package/app/{25-bundle-hippo-1akyow0x49e-62cde6a9726143e17ba8.js.gz → 25-bundle-hippo-nk48rou0tz-62cde6a9726143e17ba8.js.gz} +0 -0
  39. package/app/{26-bundle-hippo-1akyow0x49e-a4d9c1035797fa6833e0.js → 26-bundle-hippo-nk48rou0tz-a4d9c1035797fa6833e0.js} +0 -0
  40. package/app/{26-bundle-hippo-1akyow0x49e-a4d9c1035797fa6833e0.js.gz → 26-bundle-hippo-nk48rou0tz-a4d9c1035797fa6833e0.js.gz} +0 -0
  41. package/app/{27-bundle-hippo-1akyow0x49e-8039aa81e03e3861eb9c.js → 27-bundle-hippo-nk48rou0tz-8039aa81e03e3861eb9c.js} +0 -0
  42. package/app/{27-bundle-hippo-1akyow0x49e-8039aa81e03e3861eb9c.js.gz → 27-bundle-hippo-nk48rou0tz-8039aa81e03e3861eb9c.js.gz} +0 -0
  43. package/app/{28-bundle-hippo-1akyow0x49e-353eb834d3a63147334f.js → 28-bundle-hippo-nk48rou0tz-353eb834d3a63147334f.js} +0 -0
  44. package/app/{28-bundle-hippo-1akyow0x49e-353eb834d3a63147334f.js.gz → 28-bundle-hippo-nk48rou0tz-353eb834d3a63147334f.js.gz} +0 -0
  45. package/app/{29-bundle-hippo-1akyow0x49e-910b3cca379876365c10.js → 29-bundle-hippo-nk48rou0tz-910b3cca379876365c10.js} +0 -0
  46. package/app/{29-bundle-hippo-1akyow0x49e-910b3cca379876365c10.js.gz → 29-bundle-hippo-nk48rou0tz-910b3cca379876365c10.js.gz} +0 -0
  47. package/app/{3-bundle-hippo-1akyow0x49e-0c490938e0ad83296076.js → 3-bundle-hippo-nk48rou0tz-0c490938e0ad83296076.js} +0 -0
  48. package/app/{3-bundle-hippo-1akyow0x49e-0c490938e0ad83296076.js.gz → 3-bundle-hippo-nk48rou0tz-0c490938e0ad83296076.js.gz} +0 -0
  49. package/app/{30-bundle-hippo-1akyow0x49e-4110c5fa2e3ad99437d6.js → 30-bundle-hippo-nk48rou0tz-4110c5fa2e3ad99437d6.js} +0 -0
  50. package/app/{30-bundle-hippo-1akyow0x49e-4110c5fa2e3ad99437d6.js.gz → 30-bundle-hippo-nk48rou0tz-4110c5fa2e3ad99437d6.js.gz} +0 -0
  51. package/app/{31-bundle-hippo-1akyow0x49e-3884db8a74297e2c09ab.js → 31-bundle-hippo-nk48rou0tz-3884db8a74297e2c09ab.js} +0 -0
  52. package/app/{31-bundle-hippo-1akyow0x49e-3884db8a74297e2c09ab.js.gz → 31-bundle-hippo-nk48rou0tz-3884db8a74297e2c09ab.js.gz} +0 -0
  53. package/app/{32-bundle-hippo-1akyow0x49e-50c90576e4d31793fe19.js → 32-bundle-hippo-nk48rou0tz-50c90576e4d31793fe19.js} +0 -0
  54. package/app/{32-bundle-hippo-1akyow0x49e-50c90576e4d31793fe19.js.gz → 32-bundle-hippo-nk48rou0tz-50c90576e4d31793fe19.js.gz} +0 -0
  55. package/app/{33-bundle-hippo-1akyow0x49e-ec36579c5bd9e09edb2a.js → 33-bundle-hippo-nk48rou0tz-ec36579c5bd9e09edb2a.js} +0 -0
  56. package/app/{33-bundle-hippo-1akyow0x49e-ec36579c5bd9e09edb2a.js.gz → 33-bundle-hippo-nk48rou0tz-ec36579c5bd9e09edb2a.js.gz} +0 -0
  57. package/app/{34-bundle-hippo-1akyow0x49e-a0c4735c2dd0eeac23c5.js → 34-bundle-hippo-nk48rou0tz-a0c4735c2dd0eeac23c5.js} +0 -0
  58. package/app/{34-bundle-hippo-1akyow0x49e-a0c4735c2dd0eeac23c5.js.gz → 34-bundle-hippo-nk48rou0tz-a0c4735c2dd0eeac23c5.js.gz} +0 -0
  59. package/app/{35-bundle-hippo-1akyow0x49e-73beb670ea5402df311d.js → 35-bundle-hippo-nk48rou0tz-73beb670ea5402df311d.js} +0 -0
  60. package/app/{35-bundle-hippo-1akyow0x49e-73beb670ea5402df311d.js.gz → 35-bundle-hippo-nk48rou0tz-73beb670ea5402df311d.js.gz} +0 -0
  61. package/app/{4-bundle-hippo-1akyow0x49e-940afefcbf06efd7580d.js → 4-bundle-hippo-nk48rou0tz-87334d0dabfdfe70dc9b.js} +1 -1
  62. package/app/{4-bundle-hippo-1akyow0x49e-940afefcbf06efd7580d.js.gz → 4-bundle-hippo-nk48rou0tz-87334d0dabfdfe70dc9b.js.gz} +0 -0
  63. package/app/{6-bundle-hippo-1akyow0x49e-8913ee7cf4e2a0dedaca.js → 6-bundle-hippo-nk48rou0tz-8913ee7cf4e2a0dedaca.js} +0 -0
  64. package/app/{6-bundle-hippo-1akyow0x49e-8913ee7cf4e2a0dedaca.js.gz → 6-bundle-hippo-nk48rou0tz-8913ee7cf4e2a0dedaca.js.gz} +0 -0
  65. package/app/{7-bundle-hippo-1akyow0x49e-c086485bc908586c1de8.js → 7-bundle-hippo-nk48rou0tz-c086485bc908586c1de8.js} +0 -0
  66. package/app/{7-bundle-hippo-1akyow0x49e-c086485bc908586c1de8.js.gz → 7-bundle-hippo-nk48rou0tz-c086485bc908586c1de8.js.gz} +0 -0
  67. package/app/{8-bundle-hippo-1akyow0x49e-f009f29348792b3923c8.js → 8-bundle-hippo-nk48rou0tz-f009f29348792b3923c8.js} +0 -0
  68. package/app/{8-bundle-hippo-1akyow0x49e-f009f29348792b3923c8.js.gz → 8-bundle-hippo-nk48rou0tz-f009f29348792b3923c8.js.gz} +0 -0
  69. package/app/{9-bundle-hippo-1akyow0x49e-6a081e90ce91d4100de0.js → 9-bundle-hippo-nk48rou0tz-6a081e90ce91d4100de0.js} +0 -0
  70. package/app/{9-bundle-hippo-1akyow0x49e-6a081e90ce91d4100de0.js.gz → 9-bundle-hippo-nk48rou0tz-6a081e90ce91d4100de0.js.gz} +0 -0
  71. package/app/hv_recorder.js +28 -28
  72. package/app/hv_recorder.js.gz +0 -0
  73. package/app/webpack-common-manifest.json +70 -70
  74. package/package.json +8 -1
  75. package/app/12-bundle-hippo-1akyow0x49e-36c0a5791489c8db48a0.js.gz +0 -0
@@ -81,4 +81,4 @@
81
81
  /*!*****************************!*\
82
82
  !*** ./src/utils/logger.js ***!
83
83
  \*****************************/
84
- /*! exports provided: enableLogs, logger */function(e,t,r){"use strict";r.r(t),r.d(t,"enableLogs",(function(){return u})),r.d(t,"logger",(function(){return c}));var i=r(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=n;function o(e,t){return t="["+e+"] > "+t}var l=Object(i.getSelfScope)();function d(e){var t=l.console[e];return t?function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=o(e,i[0])),t.apply(l.console,i)}:a}var u=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):d(t)}))}(e,"debug","log","info","warn","error");try{s.log()}catch(e){s=n}}else s=n},c=s}}).default},e.exports=i())},771:function(e,t,r){"use strict";r.r(t);r(72),r(113),r(96),r(23),r(150),r(64),r(151);var i=r(94),a=r.n(i),n=r(45),s=r.n(n),o=r(46),l=r.n(o),d=(r(112),r(425),r(770)),u=r.n(d);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=function(){function e(t){var r=t.hlsInstance,i=t.statsJsonSeed;s()(this,e),this.hls=r,this.media=r.media,this.statsJsonSeed=i}return l()(e,[{key:"init",value:function(){this.initLogger(),this.HLSLogger&&this.setupMetrics()}},{key:"initLogger",value:function(){if(window.HippoVideo){var e=window.HippoVideo.Class,t=e.Level;this.generateStatConstants.call(this),this.HLSLogger=e.Logger.getLogger("[HLSAdapter]"),this.HLSLoggerLevel=t.INFO}}},{key:"generateStatConstants",value:function(){var e,t,r,i,a,n,s,o=(null===(e=window.HippoVideo)||void 0===e||null===(t=e.UserProfile)||void 0===t?void 0:t.tenantId)||null,l=(null===(r=window.HippoVideo)||void 0===r||null===(i=r.UserProfile)||void 0===i?void 0:i.userId)||null,d=null===(a=window.HippoVideo)||void 0===a?void 0:a.generateUniqueId(),u=!(null===(n=window.HippoVideo)||void 0===n||!n.isDelivery),c=null===(s=navigator.connection)||void 0===s?void 0:s.rtt;this.statsConstants=h(h({},this.statsJsonSeed),{},{tenant_id:o,user_id:l,session_id:d,isDelivery:u,rtt:c})}},{key:"setupMetrics",value:function(){var e=this;e.timeChart={done:!0},e.media.addEventListener("play",(function(){e.timeChart.playClickedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),e.hls.on(u.a.Events.FRAG_LOADED,(function(t,r){e.timeChart.firstFragLoadedAt||(e.timeChart.firstFragLoadedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1);try{e.timeChart.bandwidthConsumed||(e.timeChart.bandwidthConsumed=0),r&&r.frag&&r.frag.loaded&&(e.timeChart.bandwidthConsumed+=Number(r.frag.loaded))}catch(e){}})),e.hls.on(u.a.Events.LEVEL_SWITCHED,(function(){e.timeChart.levelSwitchedCount||(e.timeChart.levelSwitchedCount=0),e.timeChart.levelSwitchedCount++})),e.media.addEventListener("ended",(function(){e.timeChart.mediaEndedAt||(e.timeChart.mediaEndedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1)})),e.media.addEventListener("waiting",(function(){e.timeChart.mediaWaitingAtArr||(e.timeChart.mediaWaitingAtArr=[]),e.timeChart.mediaWaitingAtArr.push(Number(performance.now().toFixed(2)))})),e.media.addEventListener("playing",(function(){if(e.timeChart.mediaTimeLagArr||(e.timeChart.mediaTimeLagArr=[]),e.timeChart.mediaWaitingAtArr&&e.timeChart.mediaWaitingAtArr.length>e.timeChart.mediaTimeLagArr.length){var t=e.timeChart.mediaWaitingAtArr,r=t[t.length-1],i=Number(performance.now().toFixed(2));e.timeChart.mediaTimeLagArr.push(i-r),e.timeChart.mediaTimeLag=i-r}e.timeChart.done=!1})),e.media.addEventListener("seeked",(function(){e.timeChart.mediaSeekedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),window.addEventListener("beforeunload",(function(){e.timeChart.windowUnloadAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1,e.timeChartEval.call(e)})),setInterval((function(){e.timeChartEval()}),2e3)}},{key:"timeChartEval",value:function(){if(!this.timeChart.done){if(this.timeChart.playClickedAt&&(this.timeChart.firstFragLoadedAt&&(this.logg({metric_name:"time-to-first-frame",metric_value:Math.max(0,this.timeChart.firstFragLoadedAt-this.timeChart.playClickedAt)}),this.timeChart.videoStarted=!0,delete this.timeChart.playClickedAt),this.timeChart.videoPlayIntented=!0),this.timeChart.mediaEndedAt||this.timeChart.windowUnloadAt){var e;this.timeChart.levelSwitchedCount&&(this.logg({metric_name:"number-of-variant-changes",metric_value:this.timeChart.levelSwitchedCount}),delete this.timeChart.levelSwitchedCount),this.timeChart.mediaWaitingAtArr&&(this.logg({metric_name:"video-stalled-count",metric_value:this.timeChart.mediaWaitingAtArr.length}),delete this.timeChart.mediaWaitingAtArr),this.timeChart.bandwidthConsumed&&(this.logg({metric_name:"video-bandwidth-used",metric_value:this.timeChart.bandwidthConsumed}),delete this.timeChart.bandwidthConsumed),this.timeChart.videoPlayIntented&&!this.timeChart.videoStarted&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"video-adandon-before-start",metric_value:this.timeChart.windowUnloadAt}),!this.timeChart.videoPlayIntented&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"page-adandon-before-clicking-play",metric_value:this.timeChart.windowUnloadAt});var t=localStorage.getItem("hv-delivery-loaded");t&&null!==(e=this.statsConstants)&&void 0!==e&&e.isDelivery&&(this.logg({metric_name:"hv-delivery-loaded",metric_value:t}),localStorage.removeItem("hv-delivery-loaded")),delete this.timeChart.mediaEndedAt,delete this.timeChart.windowUnloadAt}this.timeChart.mediaTimeLag&&(this.logg({metric_name:"video-stalled-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),this.timeChart.mediaSeekedAt&&(this.logg({metric_name:"video-stalledBySeek-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),delete this.timeChart.mediaSeekedAt),delete this.timeChart.mediaTimeLag),this.timeChart.done=!0}}},{key:"logg",value:function(e){var t=this.hls.currentLevel;this.HLSLogger.log(this.HLSLoggerLevel,"hlsPlayerMetrics",h(h(h({},this.statsConstants),e),{},{resolutionPlayed:t}))}}]),e}();t.default=f}}]);
84
+ /*! exports provided: enableLogs, logger */function(e,t,r){"use strict";r.r(t),r.d(t,"enableLogs",(function(){return u})),r.d(t,"logger",(function(){return c}));var i=r(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function a(){}var n={trace:a,debug:a,log:a,warn:a,info:a,error:a},s=n;function o(e,t){return t="["+e+"] > "+t}var l=Object(i.getSelfScope)();function d(e){var t=l.console[e];return t?function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=o(e,i[0])),t.apply(l.console,i)}:a}var u=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):d(t)}))}(e,"debug","log","info","warn","error");try{s.log()}catch(e){s=n}}else s=n},c=s}}).default},e.exports=i())},771:function(e,t,r){"use strict";r.r(t);r(73),r(115),r(98),r(23),r(152),r(65),r(153);var i=r(96),a=r.n(i),n=r(45),s=r.n(n),o=r(46),l=r.n(o),d=(r(114),r(425),r(770)),u=r.n(d);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=function(){function e(t){var r=t.hlsInstance,i=t.statsJsonSeed;s()(this,e),this.hls=r,this.media=r.media,this.statsJsonSeed=i}return l()(e,[{key:"init",value:function(){this.initLogger(),this.HLSLogger&&this.setupMetrics()}},{key:"initLogger",value:function(){if(window.HippoVideo){var e=window.HippoVideo.Class,t=e.Level;this.generateStatConstants.call(this),this.HLSLogger=e.Logger.getLogger("[HLSAdapter]"),this.HLSLoggerLevel=t.INFO}}},{key:"generateStatConstants",value:function(){var e,t,r,i,a,n,s,o=(null===(e=window.HippoVideo)||void 0===e||null===(t=e.UserProfile)||void 0===t?void 0:t.tenantId)||null,l=(null===(r=window.HippoVideo)||void 0===r||null===(i=r.UserProfile)||void 0===i?void 0:i.userId)||null,d=null===(a=window.HippoVideo)||void 0===a?void 0:a.generateUniqueId(),u=!(null===(n=window.HippoVideo)||void 0===n||!n.isDelivery),c=null===(s=navigator.connection)||void 0===s?void 0:s.rtt;this.statsConstants=h(h({},this.statsJsonSeed),{},{tenant_id:o,user_id:l,session_id:d,isDelivery:u,rtt:c})}},{key:"setupMetrics",value:function(){var e=this;e.timeChart={done:!0},e.media.addEventListener("play",(function(){e.timeChart.playClickedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),e.hls.on(u.a.Events.FRAG_LOADED,(function(t,r){e.timeChart.firstFragLoadedAt||(e.timeChart.firstFragLoadedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1);try{e.timeChart.bandwidthConsumed||(e.timeChart.bandwidthConsumed=0),r&&r.frag&&r.frag.loaded&&(e.timeChart.bandwidthConsumed+=Number(r.frag.loaded))}catch(e){}})),e.hls.on(u.a.Events.LEVEL_SWITCHED,(function(){e.timeChart.levelSwitchedCount||(e.timeChart.levelSwitchedCount=0),e.timeChart.levelSwitchedCount++})),e.media.addEventListener("ended",(function(){e.timeChart.mediaEndedAt||(e.timeChart.mediaEndedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1)})),e.media.addEventListener("waiting",(function(){e.timeChart.mediaWaitingAtArr||(e.timeChart.mediaWaitingAtArr=[]),e.timeChart.mediaWaitingAtArr.push(Number(performance.now().toFixed(2)))})),e.media.addEventListener("playing",(function(){if(e.timeChart.mediaTimeLagArr||(e.timeChart.mediaTimeLagArr=[]),e.timeChart.mediaWaitingAtArr&&e.timeChart.mediaWaitingAtArr.length>e.timeChart.mediaTimeLagArr.length){var t=e.timeChart.mediaWaitingAtArr,r=t[t.length-1],i=Number(performance.now().toFixed(2));e.timeChart.mediaTimeLagArr.push(i-r),e.timeChart.mediaTimeLag=i-r}e.timeChart.done=!1})),e.media.addEventListener("seeked",(function(){e.timeChart.mediaSeekedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),window.addEventListener("beforeunload",(function(){e.timeChart.windowUnloadAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1,e.timeChartEval.call(e)})),setInterval((function(){e.timeChartEval()}),2e3)}},{key:"timeChartEval",value:function(){if(!this.timeChart.done){if(this.timeChart.playClickedAt&&(this.timeChart.firstFragLoadedAt&&(this.logg({metric_name:"time-to-first-frame",metric_value:Math.max(0,this.timeChart.firstFragLoadedAt-this.timeChart.playClickedAt)}),this.timeChart.videoStarted=!0,delete this.timeChart.playClickedAt),this.timeChart.videoPlayIntented=!0),this.timeChart.mediaEndedAt||this.timeChart.windowUnloadAt){var e;this.timeChart.levelSwitchedCount&&(this.logg({metric_name:"number-of-variant-changes",metric_value:this.timeChart.levelSwitchedCount}),delete this.timeChart.levelSwitchedCount),this.timeChart.mediaWaitingAtArr&&(this.logg({metric_name:"video-stalled-count",metric_value:this.timeChart.mediaWaitingAtArr.length}),delete this.timeChart.mediaWaitingAtArr),this.timeChart.bandwidthConsumed&&(this.logg({metric_name:"video-bandwidth-used",metric_value:this.timeChart.bandwidthConsumed}),delete this.timeChart.bandwidthConsumed),this.timeChart.videoPlayIntented&&!this.timeChart.videoStarted&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"video-adandon-before-start",metric_value:this.timeChart.windowUnloadAt}),!this.timeChart.videoPlayIntented&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"page-adandon-before-clicking-play",metric_value:this.timeChart.windowUnloadAt});var t=localStorage.getItem("hv-delivery-loaded");t&&null!==(e=this.statsConstants)&&void 0!==e&&e.isDelivery&&(this.logg({metric_name:"hv-delivery-loaded",metric_value:t}),localStorage.removeItem("hv-delivery-loaded")),delete this.timeChart.mediaEndedAt,delete this.timeChart.windowUnloadAt}this.timeChart.mediaTimeLag&&(this.logg({metric_name:"video-stalled-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),this.timeChart.mediaSeekedAt&&(this.logg({metric_name:"video-stalledBySeek-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),delete this.timeChart.mediaSeekedAt),delete this.timeChart.mediaTimeLag),this.timeChart.done=!0}}},{key:"logg",value:function(e){var t=this.hls.currentLevel;this.HLSLogger.log(this.HLSLoggerLevel,"hlsPlayerMetrics",h(h(h({},this.statsConstants),e),{},{resolutionPlayed:t}))}}]),e}();t.default=f}}]);