@gcorevideo/player 2.19.15 → 2.20.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 (338) hide show
  1. package/assets/level-selector/list.ejs +1 -1
  2. package/dist/core.js +2 -2
  3. package/dist/index.css +966 -966
  4. package/dist/index.js +884 -627
  5. package/dist/player.d.ts +536 -122
  6. package/dist/plugins/index.css +1160 -1160
  7. package/dist/plugins/index.js +2006 -1725
  8. package/docs/api/player.audioselector.md +1 -251
  9. package/docs/api/player.bigmutebutton.md +1 -156
  10. package/docs/api/player.clapprnerdstats.md +12 -259
  11. package/docs/api/player.clapprstats.exportmetrics.md +4 -0
  12. package/docs/api/player.clapprstats.md +7 -223
  13. package/docs/api/player.clapprstats.setupdatemetrics.md +2 -0
  14. package/docs/api/player.clicktopause.md +5 -113
  15. package/docs/api/player.clipsplugin.gettext.md +9 -0
  16. package/docs/api/player.clipsplugin.md +10 -94
  17. package/docs/api/{player.playbackrate.setselectedrate.md → player.clipspluginsettings.md} +18 -10
  18. package/docs/api/player.clipspluginsettings.text.md +13 -0
  19. package/docs/api/player.contextmenu._constructor_.md +6 -3
  20. package/docs/api/player.contextmenu.md +13 -256
  21. package/docs/api/player.contextmenupluginsettings.label.md +11 -0
  22. package/docs/api/player.contextmenupluginsettings.md +93 -0
  23. package/docs/api/player.contextmenupluginsettings.preventshowcontextmenu.md +11 -0
  24. package/docs/api/player.contextmenupluginsettings.url.md +11 -0
  25. package/docs/api/player.dvrcontrols.md +5 -1
  26. package/docs/api/player.errorscreen.attributes.md +3 -0
  27. package/docs/api/player.errorscreen.bindevents.md +3 -0
  28. package/docs/api/player.errorscreen.container.md +3 -0
  29. package/docs/api/player.errorscreen.hide.md +3 -0
  30. package/docs/api/player.errorscreen.md +25 -0
  31. package/docs/api/player.errorscreen.name.md +3 -0
  32. package/docs/api/player.errorscreen.render.md +3 -0
  33. package/docs/api/player.errorscreen.show.md +3 -0
  34. package/docs/api/player.errorscreen.supportedversion.md +3 -0
  35. package/docs/api/player.errorscreen.template.md +3 -0
  36. package/docs/api/player.errorscreen.unbindevents.md +3 -0
  37. package/docs/api/player.favicon._constructor_.md +3 -0
  38. package/docs/api/player.favicon.bindevents.md +3 -0
  39. package/docs/api/player.favicon.configure.md +3 -0
  40. package/docs/api/player.favicon.destroy.md +3 -0
  41. package/docs/api/player.favicon.disable.md +3 -0
  42. package/docs/api/player.favicon.md +18 -1
  43. package/docs/api/player.favicon.name.md +3 -0
  44. package/docs/api/player.favicon.supportedversion.md +3 -0
  45. package/docs/api/player.gearevents.md +4 -1
  46. package/docs/api/player.googleanalytics._constructor_.md +3 -0
  47. package/docs/api/player.googleanalytics.addeventlisteners.md +3 -0
  48. package/docs/api/player.googleanalytics.embedscript.md +3 -0
  49. package/docs/api/player.googleanalytics.md +42 -1
  50. package/docs/api/player.googleanalytics.name.md +3 -0
  51. package/docs/api/player.googleanalytics.onbufferfull.md +3 -0
  52. package/docs/api/player.googleanalytics.onbuffering.md +3 -0
  53. package/docs/api/player.googleanalytics.ondvr.md +3 -0
  54. package/docs/api/player.googleanalytics.onended.md +3 -0
  55. package/docs/api/player.googleanalytics.onerror.md +3 -0
  56. package/docs/api/player.googleanalytics.onfullscreen.md +3 -0
  57. package/docs/api/player.googleanalytics.onhd.md +3 -0
  58. package/docs/api/player.googleanalytics.onpause.md +3 -0
  59. package/docs/api/player.googleanalytics.onplay.md +3 -0
  60. package/docs/api/player.googleanalytics.onready.md +3 -0
  61. package/docs/api/player.googleanalytics.onseek.md +3 -0
  62. package/docs/api/player.googleanalytics.onstop.md +3 -0
  63. package/docs/api/player.googleanalytics.onvolumechanged.md +3 -0
  64. package/docs/api/player.googleanalytics.push.md +3 -0
  65. package/docs/api/player.googleanalytics.supportedversion.md +3 -0
  66. package/docs/api/{player.clapprstats.name.md → player.initeventdata.event.md} +3 -3
  67. package/docs/api/player.initeventdata.md +60 -0
  68. package/docs/api/player.logo._constructor_.md +3 -0
  69. package/docs/api/player.logo.attributes.md +3 -0
  70. package/docs/api/player.logo.bindevents.md +3 -0
  71. package/docs/api/player.logo.md +20 -1
  72. package/docs/api/player.logo.name.md +3 -0
  73. package/docs/api/player.logo.render.md +3 -0
  74. package/docs/api/player.logo.stoplistening.md +3 -0
  75. package/docs/api/player.logo.supportedversion.md +3 -0
  76. package/docs/api/player.logo.template.md +3 -0
  77. package/docs/api/player.md +149 -18
  78. package/docs/api/player.mediacontrolelement.md +1 -1
  79. package/docs/api/player.multicamera.md +2 -0
  80. package/docs/api/player.pictureinpicture.md +9 -197
  81. package/docs/api/player.playbackrate.md +10 -314
  82. package/docs/api/player.seektime.attributes.md +3 -0
  83. package/docs/api/player.seektime.bindevents.md +3 -0
  84. package/docs/api/player.seektime.durationshown.md +3 -0
  85. package/docs/api/player.seektime.getseektime.md +3 -0
  86. package/docs/api/player.seektime.islivestreamwithdvr.md +3 -0
  87. package/docs/api/player.seektime.md +31 -0
  88. package/docs/api/player.seektime.mediacontrol.md +3 -0
  89. package/docs/api/player.seektime.mediacontrolcontainer.md +3 -0
  90. package/docs/api/player.seektime.name.md +3 -0
  91. package/docs/api/player.seektime.render.md +3 -0
  92. package/docs/api/player.seektime.shouldbevisible.md +3 -0
  93. package/docs/api/player.seektime.supportedversion.md +3 -0
  94. package/docs/api/player.seektime.template.md +3 -0
  95. package/docs/api/player.seektime.update.md +3 -0
  96. package/docs/api/player.share.md +2 -0
  97. package/docs/api/player.skiptime.md +2 -0
  98. package/docs/api/{player.clapprstats.destroy.md → player.stalleventdata.count.md} +5 -7
  99. package/docs/api/{player.bigmutebutton.template.md → player.stalleventdata.event.md} +3 -3
  100. package/docs/api/player.stalleventdata.md +117 -0
  101. package/docs/api/{player.audioselector.onshowlevelselectmenu.md → player.stalleventdata.time.md} +5 -7
  102. package/docs/api/{player.clapprstats.starttimers.md → player.stalleventdata.total_ms.md} +5 -7
  103. package/docs/api/{player.audioselector.template.md → player.starteventdata.event.md} +3 -3
  104. package/docs/api/player.starteventdata.md +60 -0
  105. package/docs/api/{player.clapprstats._defaultreport.md → player.telemetry._constructor_.md} +7 -9
  106. package/docs/api/player.telemetry.md +146 -0
  107. package/docs/api/{player.clapprnerdstats.name.md → player.telemetry.name.md} +4 -2
  108. package/docs/api/{player.clapprstats.supportedversion.md → player.telemetry.supportedversion.md} +4 -2
  109. package/docs/api/player.telemetryevent.md +100 -0
  110. package/docs/api/player.telemetryeventdata.md +18 -0
  111. package/docs/api/player.telemetrypluginsettings.md +60 -0
  112. package/docs/api/{player.audioselector.bindevents.md → player.telemetrypluginsettings.send.md} +5 -7
  113. package/docs/api/{player.audioselector.reload.md → player.telemetryrecord.md} +8 -6
  114. package/docs/api/player.thumbnails.md +21 -139
  115. package/docs/api/player.thumbnailspluginsettings.md +23 -0
  116. package/docs/api/player.volumefade.md +1 -93
  117. package/docs/api/{player.audioselector.name.md → player.watcheventdata.event.md} +3 -3
  118. package/docs/api/player.watcheventdata.md +60 -0
  119. package/lib/index.plugins.d.ts +2 -3
  120. package/lib/index.plugins.d.ts.map +1 -1
  121. package/lib/index.plugins.js +2 -3
  122. package/lib/playback/hls-playback/HlsPlayback.js +1 -1
  123. package/lib/plugins/audio-selector/AudioSelector.d.ts +28 -6
  124. package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
  125. package/lib/plugins/audio-selector/AudioSelector.js +52 -22
  126. package/lib/plugins/big-mute-button/BigMuteButton.d.ts +18 -2
  127. package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
  128. package/lib/plugins/big-mute-button/BigMuteButton.js +21 -16
  129. package/lib/plugins/bottom-gear/BottomGear.d.ts +1 -0
  130. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  131. package/lib/plugins/bottom-gear/BottomGear.js +1 -0
  132. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +38 -5
  133. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
  134. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +63 -17
  135. package/lib/plugins/clappr-stats/ClapprStats.d.ts +31 -8
  136. package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
  137. package/lib/plugins/clappr-stats/ClapprStats.js +24 -0
  138. package/lib/plugins/clappr-stats/types.d.ts +12 -0
  139. package/lib/plugins/clappr-stats/types.d.ts.map +1 -1
  140. package/lib/plugins/clappr-stats/types.js +3 -0
  141. package/lib/plugins/click-to-pause/ClickToPause.d.ts +13 -1
  142. package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
  143. package/lib/plugins/click-to-pause/ClickToPause.js +14 -4
  144. package/lib/plugins/clips/Clips.d.ts +34 -2
  145. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  146. package/lib/plugins/clips/Clips.js +51 -22
  147. package/lib/plugins/context-menu/ContextMenu.d.ts +40 -13
  148. package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
  149. package/lib/plugins/context-menu/ContextMenu.js +48 -36
  150. package/lib/plugins/dvr-controls/DvrControls.d.ts +5 -4
  151. package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
  152. package/lib/plugins/dvr-controls/DvrControls.js +15 -29
  153. package/lib/plugins/error-screen/ErrorScreen.d.ts +4 -0
  154. package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
  155. package/lib/plugins/error-screen/ErrorScreen.js +4 -0
  156. package/lib/plugins/favicon/Favicon.d.ts +4 -0
  157. package/lib/plugins/favicon/Favicon.d.ts.map +1 -1
  158. package/lib/plugins/favicon/Favicon.js +4 -0
  159. package/lib/plugins/google-analytics/GoogleAnalytics.d.ts +4 -0
  160. package/lib/plugins/google-analytics/GoogleAnalytics.d.ts.map +1 -1
  161. package/lib/plugins/google-analytics/GoogleAnalytics.js +5 -1
  162. package/lib/plugins/index.d.ts +2 -4
  163. package/lib/plugins/index.d.ts.map +1 -1
  164. package/lib/plugins/index.js +2 -4
  165. package/lib/plugins/logo/Logo.d.ts +4 -0
  166. package/lib/plugins/logo/Logo.d.ts.map +1 -1
  167. package/lib/plugins/logo/Logo.js +4 -0
  168. package/lib/plugins/media-control/MediaControl.d.ts +1 -1
  169. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  170. package/lib/plugins/media-control/MediaControl.js +3 -1
  171. package/lib/plugins/multi-camera/MultiCamera.d.ts +3 -0
  172. package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
  173. package/lib/plugins/multi-camera/MultiCamera.js +3 -0
  174. package/lib/plugins/picture-in-picture/PictureInPicture.d.ts +32 -4
  175. package/lib/plugins/picture-in-picture/PictureInPicture.d.ts.map +1 -1
  176. package/lib/plugins/picture-in-picture/PictureInPicture.js +30 -2
  177. package/lib/plugins/playback-rate/PlaybackRate.d.ts +47 -14
  178. package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
  179. package/lib/plugins/playback-rate/PlaybackRate.js +38 -9
  180. package/lib/plugins/seek-time/SeekTime.d.ts +4 -0
  181. package/lib/plugins/seek-time/SeekTime.d.ts.map +1 -1
  182. package/lib/plugins/seek-time/SeekTime.js +5 -1
  183. package/lib/plugins/share/Share.d.ts +3 -0
  184. package/lib/plugins/share/Share.d.ts.map +1 -1
  185. package/lib/plugins/share/Share.js +3 -0
  186. package/lib/plugins/skip-time/SkipTime.d.ts +3 -0
  187. package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
  188. package/lib/plugins/skip-time/SkipTime.js +3 -0
  189. package/lib/plugins/statistics/Statistics.d.ts +38 -3
  190. package/lib/plugins/statistics/Statistics.d.ts.map +1 -1
  191. package/lib/plugins/statistics/Statistics.js +51 -9
  192. package/lib/plugins/telemetry/Telemetry.d.ts +153 -0
  193. package/lib/plugins/telemetry/Telemetry.d.ts.map +1 -0
  194. package/lib/plugins/telemetry/Telemetry.js +181 -0
  195. package/lib/plugins/thumbnails/Thumbnails.d.ts +48 -3
  196. package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
  197. package/lib/plugins/thumbnails/Thumbnails.js +52 -18
  198. package/lib/plugins/volume-fade/VolumeFade.d.ts +8 -1
  199. package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
  200. package/lib/plugins/volume-fade/VolumeFade.js +9 -1
  201. package/package.json +1 -1
  202. package/src/index.plugins.ts +2 -3
  203. package/src/playback/hls-playback/HlsPlayback.ts +1 -1
  204. package/src/plugins/audio-selector/AudioSelector.ts +227 -154
  205. package/src/plugins/big-mute-button/BigMuteButton.ts +100 -79
  206. package/src/plugins/bottom-gear/BottomGear.ts +1 -0
  207. package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +240 -173
  208. package/src/plugins/clappr-stats/ClapprStats.ts +32 -8
  209. package/src/plugins/clappr-stats/types.ts +13 -0
  210. package/src/plugins/click-to-pause/ClickToPause.ts +47 -36
  211. package/src/plugins/clips/Clips.ts +127 -71
  212. package/src/plugins/context-menu/ContextMenu.ts +105 -76
  213. package/src/plugins/dvr-controls/DvrControls.ts +15 -31
  214. package/src/plugins/error-screen/ErrorScreen.ts +4 -0
  215. package/src/plugins/favicon/Favicon.ts +4 -0
  216. package/src/plugins/google-analytics/GoogleAnalytics.ts +5 -1
  217. package/src/plugins/index.ts +2 -4
  218. package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +47 -26
  219. package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +18 -18
  220. package/src/plugins/logo/Logo.ts +4 -0
  221. package/src/plugins/media-control/MediaControl.ts +4 -1
  222. package/src/plugins/multi-camera/MultiCamera.ts +3 -0
  223. package/src/plugins/picture-in-picture/PictureInPicture.ts +35 -7
  224. package/src/plugins/playback-rate/PlaybackRate.ts +53 -24
  225. package/src/plugins/seek-time/SeekTime.ts +5 -1
  226. package/src/plugins/share/Share.ts +3 -0
  227. package/src/plugins/skip-time/SkipTime.ts +3 -0
  228. package/src/plugins/telemetry/Telemetry.ts +317 -0
  229. package/src/plugins/thumbnails/Thumbnails.ts +268 -194
  230. package/src/plugins/volume-fade/VolumeFade.ts +10 -2
  231. package/temp/player.api.json +2457 -5257
  232. package/tsconfig.tsbuildinfo +1 -1
  233. package/docs/api/player.audioselector.attributes.md +0 -17
  234. package/docs/api/player.audioselector.events.md +0 -17
  235. package/docs/api/player.audioselector.hideselecttrackmenu.md +0 -18
  236. package/docs/api/player.audioselector.render.md +0 -18
  237. package/docs/api/player.audioselector.supportedversion.md +0 -16
  238. package/docs/api/player.audioselector.togglecontextmenu.md +0 -18
  239. package/docs/api/player.audioselector.unbindevents.md +0 -18
  240. package/docs/api/player.audioselector.version.md +0 -14
  241. package/docs/api/player.bigmutebutton.bindevents.md +0 -18
  242. package/docs/api/player.bigmutebutton.events.md +0 -17
  243. package/docs/api/player.bigmutebutton.name.md +0 -14
  244. package/docs/api/player.bigmutebutton.render.md +0 -18
  245. package/docs/api/player.bigmutebutton.supportedversion.md +0 -16
  246. package/docs/api/player.clapprnerdstats.attributes.md +0 -17
  247. package/docs/api/player.clapprnerdstats.bindevents.md +0 -18
  248. package/docs/api/player.clapprnerdstats.events.md +0 -18
  249. package/docs/api/player.clapprnerdstats.playerheight.md +0 -14
  250. package/docs/api/player.clapprnerdstats.playerwidth.md +0 -14
  251. package/docs/api/player.clapprnerdstats.render.md +0 -18
  252. package/docs/api/player.clapprnerdstats.statsboxelem.md +0 -14
  253. package/docs/api/player.clapprnerdstats.statsboxwidththreshold.md +0 -14
  254. package/docs/api/player.clapprnerdstats.supportedversion.md +0 -16
  255. package/docs/api/player.clapprnerdstats.template.md +0 -14
  256. package/docs/api/player.clapprstats._buildreport.md +0 -18
  257. package/docs/api/player.clapprstats._playbackname.md +0 -14
  258. package/docs/api/player.clapprstats._playbacktype.md +0 -14
  259. package/docs/api/player.clapprstats.bindevents.md +0 -18
  260. package/docs/api/player.clapprstats.onfirstplaying.md +0 -18
  261. package/docs/api/player.clapprstats.playafterpause.md +0 -18
  262. package/docs/api/player.clapprstats.stopreporting.md +0 -18
  263. package/docs/api/player.clicktopause.bindevents.md +0 -15
  264. package/docs/api/player.clicktopause.config.md +0 -11
  265. package/docs/api/player.clicktopause.name.md +0 -11
  266. package/docs/api/player.clicktopause.supportedversion.md +0 -13
  267. package/docs/api/player.clipsplugin.attributes.md +0 -13
  268. package/docs/api/player.clipsplugin.bindevents.md +0 -15
  269. package/docs/api/player.clipsplugin.makesvg.md +0 -49
  270. package/docs/api/player.clipsplugin.name.md +0 -11
  271. package/docs/api/player.clipsplugin.unbindevents.md +0 -15
  272. package/docs/api/player.contextmenu.attributes.md +0 -13
  273. package/docs/api/player.contextmenu.bindevents.md +0 -15
  274. package/docs/api/player.contextmenu.destroy.md +0 -15
  275. package/docs/api/player.contextmenu.events.md +0 -13
  276. package/docs/api/player.contextmenu.exposeversion.md +0 -14
  277. package/docs/api/player.contextmenu.label.md +0 -11
  278. package/docs/api/player.contextmenu.mediacontrol.md +0 -11
  279. package/docs/api/player.contextmenu.name.md +0 -11
  280. package/docs/api/player.contextmenu.render.md +0 -15
  281. package/docs/api/player.contextmenu.supportedversion.md +0 -13
  282. package/docs/api/player.contextmenu.template.md +0 -11
  283. package/docs/api/player.contextmenu.url.md +0 -11
  284. package/docs/api/player.disablecontrols.bindevents.md +0 -15
  285. package/docs/api/player.disablecontrols.container.md +0 -11
  286. package/docs/api/player.disablecontrols.md +0 -138
  287. package/docs/api/player.disablecontrols.name.md +0 -11
  288. package/docs/api/player.disablecontrols.supportedversion.md +0 -13
  289. package/docs/api/player.disablecontrols.unbindevents.md +0 -15
  290. package/docs/api/player.pictureinpicture.bindevents.md +0 -15
  291. package/docs/api/player.pictureinpicture.events.md +0 -13
  292. package/docs/api/player.pictureinpicture.exitpictureinpicture.md +0 -15
  293. package/docs/api/player.pictureinpicture.name.md +0 -11
  294. package/docs/api/player.pictureinpicture.render.md +0 -15
  295. package/docs/api/player.pictureinpicture.requestpictureinpicture.md +0 -15
  296. package/docs/api/player.pictureinpicture.supportedversion.md +0 -13
  297. package/docs/api/player.pictureinpicture.togglepictureinpicture.md +0 -15
  298. package/docs/api/player.pictureinpicture.version.md +0 -11
  299. package/docs/api/player.pictureinpicture.videoelement.md +0 -11
  300. package/docs/api/player.playbackrate.attributes.md +0 -14
  301. package/docs/api/player.playbackrate.bindevents.md +0 -15
  302. package/docs/api/player.playbackrate.events.md +0 -15
  303. package/docs/api/player.playbackrate.gettitle.md +0 -15
  304. package/docs/api/player.playbackrate.goback.md +0 -15
  305. package/docs/api/player.playbackrate.highlightcurrentrate.md +0 -15
  306. package/docs/api/player.playbackrate.name.md +0 -11
  307. package/docs/api/player.playbackrate.onfinishad.md +0 -15
  308. package/docs/api/player.playbackrate.onplay.md +0 -15
  309. package/docs/api/player.playbackrate.onrateselect.md +0 -49
  310. package/docs/api/player.playbackrate.onshowmenu.md +0 -15
  311. package/docs/api/player.playbackrate.onstartad.md +0 -15
  312. package/docs/api/player.playbackrate.onstop.md +0 -15
  313. package/docs/api/player.playbackrate.reload.md +0 -15
  314. package/docs/api/player.playbackrate.render.md +0 -15
  315. package/docs/api/player.playbackrate.supportedversion.md +0 -13
  316. package/docs/api/player.playbackrate.template.md +0 -11
  317. package/docs/api/player.playbackrate.unbindevents.md +0 -15
  318. package/docs/api/player.playbackrate.updateplaybackrate.md +0 -49
  319. package/docs/api/player.pluginsettings.md +0 -13
  320. package/docs/api/player.statistics._constructor_.md +0 -47
  321. package/docs/api/player.statistics.bindevents.md +0 -15
  322. package/docs/api/player.statistics.md +0 -141
  323. package/docs/api/player.statistics.name.md +0 -11
  324. package/docs/api/player.statistics.supportedversion.md +0 -13
  325. package/docs/api/player.thumbnails.attributes.md +0 -13
  326. package/docs/api/player.thumbnails.bindevents.md +0 -15
  327. package/docs/api/player.thumbnails.name.md +0 -11
  328. package/docs/api/player.thumbnails.settext.md +0 -49
  329. package/docs/api/player.thumbnails.supportedversion.md +0 -13
  330. package/docs/api/player.thumbnails.template.md +0 -11
  331. package/docs/api/player.volumefade.bindevents.md +0 -18
  332. package/docs/api/player.volumefade.name.md +0 -14
  333. package/docs/api/player.volumefade.unbindevents.md +0 -18
  334. package/src/plugins/disable-controls/DisableControls.ts +0 -81
  335. package/src/plugins/ga-events/GaEvents.js +0 -395
  336. package/src/plugins/ga-events/ga-tracking.js +0 -46
  337. package/src/plugins/statistics/Statistics.ts +0 -207
  338. /package/src/plugins/{statistics → telemetry}/Statistics copy.xts +0 -0
package/dist/player.d.ts CHANGED
@@ -28,41 +28,63 @@ import { UICorePlugin } from '@clappr/core';
28
28
  import { UIObject } from '@clappr/core';
29
29
 
30
30
  /**
31
+ * Adds an audio track selector to the media control UI.
31
32
  * @beta
32
33
  */
33
34
  export declare class AudioSelector extends UICorePlugin {
34
35
  private selectedTrackId;
35
36
  private currentTrack;
36
37
  private tracks;
38
+ /**
39
+ * @internal
40
+ */
37
41
  get name(): string;
42
+ /**
43
+ * @internal
44
+ */
38
45
  get supportedVersion(): {
39
46
  min: string;
40
47
  };
48
+ /**
49
+ * @internal
50
+ */
41
51
  static get version(): string;
42
- get template(): any;
52
+ private static readonly template;
53
+ /**
54
+ * @internal
55
+ */
43
56
  get attributes(): {
44
57
  class: string;
45
58
  'data-track-selector': string;
46
59
  };
60
+ /**
61
+ * @internal
62
+ */
47
63
  get events(): {
48
64
  'click [data-track-selector-select]': string;
49
65
  'click [data-track-selector-button]': string;
50
66
  };
67
+ /**
68
+ * @internal
69
+ */
51
70
  bindEvents(): void;
52
- unBindEvents(): void;
71
+ private unBindEvents;
53
72
  private bindPlaybackEvents;
54
73
  private setupAudioTrackListeners;
55
74
  private onStop;
56
- reload(): void;
75
+ private reload;
57
76
  private shouldRender;
77
+ /**
78
+ * @internal
79
+ */
58
80
  render(): this;
59
81
  private fillTracks;
60
82
  private findTrackBy;
61
83
  private onTrackSelect;
62
84
  private setIndexTrack;
63
- onShowLevelSelectMenu(): void;
64
- hideSelectTrackMenu(): void;
65
- toggleContextMenu(): void;
85
+ private onShowLevelSelectMenu;
86
+ private hideSelectTrackMenu;
87
+ private toggleContextMenu;
66
88
  private buttonElement;
67
89
  private buttonElementText;
68
90
  private trackElement;
@@ -76,6 +98,8 @@ export declare class AudioSelector extends UICorePlugin {
76
98
  }
77
99
 
78
100
  /**
101
+ * Displays a big mute button over the video when it's muted.
102
+ * Once pressed, it unmutes the video.
79
103
  * @beta
80
104
  */
81
105
  export declare class BigMuteButton extends UICorePlugin {
@@ -83,17 +107,28 @@ export declare class BigMuteButton extends UICorePlugin {
83
107
  private _adIsPlaying;
84
108
  private $bigMuteBtnContainer;
85
109
  private $bigMuteButton;
110
+ /**
111
+ * @internal
112
+ */
86
113
  get name(): string;
114
+ /**
115
+ * @internal
116
+ */
87
117
  get supportedVersion(): {
88
118
  min: string;
89
119
  };
90
- get template(): any;
120
+ private static readonly template;
121
+ /**
122
+ * @internal
123
+ */
91
124
  get events(): {
92
125
  'click .big-mute-icon': string;
93
126
  'click .big-mute-icon-wrapper': string;
94
127
  };
128
+ /**
129
+ * @internal
130
+ */
95
131
  bindEvents(): void;
96
- private unBindEvents;
97
132
  private onCoreReady;
98
133
  private onContainerVolume;
99
134
  private onContainerStart;
@@ -102,6 +137,9 @@ export declare class BigMuteButton extends UICorePlugin {
102
137
  private onStartAd;
103
138
  private onFinishAd;
104
139
  private shouldRender;
140
+ /**
141
+ * @internal
142
+ */
105
143
  render(): this;
106
144
  private hideBigMuteBtn;
107
145
  private showBigMuteBtn;
@@ -109,6 +147,9 @@ export declare class BigMuteButton extends UICorePlugin {
109
147
  private handleBigMuteBtnClick;
110
148
  }
111
149
 
150
+ /**
151
+ * @beta
152
+ */
112
153
  declare type BitrateTrackRecord = {
113
154
  start: number;
114
155
  end?: number;
@@ -183,7 +224,22 @@ export declare class BottomGear extends UICorePlugin {
183
224
  }
184
225
 
185
226
  /**
227
+ * Displays useful network-related statistics.
186
228
  * @beta
229
+ *
230
+ * @remarks
231
+ * Depends on:
232
+ *
233
+ * - {@link MediaControl}
234
+ *
235
+ * - {@link BottomGear}
236
+ *
237
+ * - {@link ClapprStats}
238
+ *
239
+ * The plugin is rendered as an item in the gear menu.
240
+ *
241
+ * When clicked, it shows an overlay window with the information about the network speed, latency, etc,
242
+ * and recommended quality level.
187
243
  */
188
244
  export declare class ClapprNerdStats extends UICorePlugin {
189
245
  private container;
@@ -192,25 +248,40 @@ export declare class ClapprNerdStats extends UICorePlugin {
192
248
  private showing;
193
249
  private shortcut;
194
250
  private iconPosition;
251
+ /**
252
+ * @internal
253
+ */
195
254
  get name(): string;
255
+ /**
256
+ * @internal
257
+ */
196
258
  get supportedVersion(): {
197
259
  min: string;
198
260
  };
199
- get template(): any;
261
+ private static readonly template;
262
+ /**
263
+ * @internal
264
+ */
200
265
  get attributes(): {
201
266
  'data-clappr-nerd-stats': string;
202
267
  class: string;
203
268
  };
269
+ /**
270
+ * @internal
271
+ */
204
272
  get events(): {
205
273
  'click [data-show-stats-button]': string;
206
274
  'click [data-close-button]': string;
207
275
  'click [data-refresh-button]': string;
208
276
  };
209
- get statsBoxElem(): string;
210
- get statsBoxWidthThreshold(): number;
211
- get playerWidth(): any;
212
- get playerHeight(): any;
277
+ private get statsBoxElem();
278
+ private get statsBoxWidthThreshold();
279
+ private get playerWidth();
280
+ private get playerHeight();
213
281
  constructor(core: Core);
282
+ /**
283
+ * @internal
284
+ */
214
285
  bindEvents(): void;
215
286
  private init;
216
287
  private toggle;
@@ -221,6 +292,9 @@ export declare class ClapprNerdStats extends UICorePlugin {
221
292
  private addCustomMetrics;
222
293
  private updateMetrics;
223
294
  private setStatsBoxSize;
295
+ /**
296
+ * @internal
297
+ */
224
298
  render(): this;
225
299
  private addToBottomGear;
226
300
  private clearCustomMetrics;
@@ -228,7 +302,10 @@ export declare class ClapprNerdStats extends UICorePlugin {
228
302
  }
229
303
 
230
304
  /**
305
+ * Collects useful statistics about playback performance.
231
306
  * @beta
307
+ * @remarks
308
+ * This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
232
309
  */
233
310
  export declare class ClapprStats extends ContainerPlugin {
234
311
  private bwMeasureCount;
@@ -243,27 +320,47 @@ export declare class ClapprStats extends ContainerPlugin {
243
320
  private updateFn;
244
321
  private urisToMeasureBandwidth;
245
322
  private uriToMeasureLatency;
323
+ /**
324
+ * @internal
325
+ */
246
326
  get name(): string;
327
+ /**
328
+ * @internal
329
+ */
247
330
  get supportedVersion(): {
248
331
  min: string;
249
332
  };
250
- get _playbackName(): string;
251
- get _playbackType(): any;
333
+ private get _playbackName();
334
+ private get _playbackType();
252
335
  private _now;
253
336
  private _inc;
254
337
  private start;
255
338
  private _stop;
339
+ /**
340
+ * Registers a callback to receive the metrics.
341
+ * @param updateMetricsFn
342
+ */
256
343
  setUpdateMetrics(updateMetricsFn: MetricsUpdateFn): void;
257
- _defaultReport(metrics: Metrics): void;
344
+ private _defaultReport;
258
345
  constructor(container: Container);
346
+ /**
347
+ * @internal
348
+ */
259
349
  bindEvents(): void;
350
+ /**
351
+ * @internal
352
+ */
260
353
  destroy(): void;
354
+ /**
355
+ * Returns the collected metrics.
356
+ * @returns The collected metrics
357
+ */
261
358
  exportMetrics(): Metrics;
262
359
  onBitrate(newBitrate: QualityLevel): void;
263
- stopReporting(): void;
264
- startTimers(): void;
265
- onFirstPlaying(): void;
266
- playAfterPause(): void;
360
+ private stopReporting;
361
+ private startTimers;
362
+ private onFirstPlaying;
363
+ private playAfterPause;
267
364
  private onPlay;
268
365
  private onPause;
269
366
  private onSeek;
@@ -274,7 +371,7 @@ export declare class ClapprStats extends ContainerPlugin {
274
371
  private onProgress;
275
372
  private _newMetrics;
276
373
  private _onCompletion;
277
- _buildReport(): void;
374
+ private _buildReport;
278
375
  private _fetchFPS;
279
376
  private _calculateBitrates;
280
377
  private _calculatePercentages;
@@ -283,14 +380,26 @@ export declare class ClapprStats extends ContainerPlugin {
283
380
  private _measureBandwidth;
284
381
  }
285
382
 
383
+ /**
384
+ * Adds a behavior of toggling the playback state on click over the container
385
+ * @beta
386
+ */
286
387
  export declare class ClickToPause extends ContainerPlugin {
287
388
  private pointerEnabled;
288
389
  private timer;
390
+ /**
391
+ * @internal
392
+ */
289
393
  get name(): string;
394
+ /**
395
+ * @internal
396
+ */
290
397
  get supportedVersion(): {
291
398
  min: string;
292
399
  };
293
- get config(): any;
400
+ /**
401
+ * @internal
402
+ */
294
403
  bindEvents(): void;
295
404
  private click;
296
405
  private settingsUpdate;
@@ -298,30 +407,63 @@ export declare class ClickToPause extends ContainerPlugin {
298
407
  private clearTimer;
299
408
  }
300
409
 
410
+ /**
411
+ * Adds a behavior of showing a text over the seekbar to indicate the current clip.
412
+ * @beta
413
+ * @remarks
414
+ * Depends on:
415
+ *
416
+ * - {@link MediaControl}
417
+ *
418
+ * Configuration options - {@link ClipsPluginSettings}
419
+ */
301
420
  export declare class ClipsPlugin extends UICorePlugin {
302
421
  private clips;
303
422
  private duration;
304
423
  private durationGetting;
305
424
  private _oldContainer;
306
425
  private svgMask;
426
+ /**
427
+ * @internal
428
+ */
307
429
  get name(): string;
430
+ /**
431
+ * @internal
432
+ */
308
433
  get attributes(): {
309
434
  class: string;
310
435
  };
436
+ /**
437
+ * @internal
438
+ */
311
439
  bindEvents(): void;
312
440
  private _onCoreReady;
313
- unbindEvents(): void;
314
441
  private _onMediaControlContainerChanged;
315
442
  private playerResize;
316
443
  private _bindContainerEvents;
317
444
  private onTimeUpdate;
318
445
  private parseClips;
446
+ /**
447
+ * Returns the text of the current clip.
448
+ * @param time - The current time of the player.
449
+ * @returns The text of the current clip.
450
+ */
319
451
  getText(time: number): string;
320
- makeSvg(duration: number): void;
452
+ private makeSvg;
321
453
  private setSVGMask;
322
454
  private setClipText;
323
455
  }
324
456
 
457
+ /**
458
+ * Configuration options
459
+ */
460
+ export declare interface ClipsPluginSettings {
461
+ /**
462
+ * The text to display over the seekbar.
463
+ */
464
+ text: string;
465
+ }
466
+
325
467
  /**
326
468
  * Dimensions of the player container DOM element.
327
469
  * @beta
@@ -331,38 +473,66 @@ export declare type ContainerSize = {
331
473
  height: number;
332
474
  };
333
475
 
334
- export declare class ContextMenu extends UICorePlugin {
476
+ /**
477
+ * Displays a small context menu when clicked on the player container.
478
+ * @beta
479
+ * @remarks
480
+ * Configuration options - {@link ContextMenuPluginSettings}
481
+ */
482
+ export declare class ContextMenu extends UIContainerPlugin {
335
483
  private _label;
336
484
  private _url;
337
- private container;
338
485
  private menuOptions;
486
+ /**
487
+ * @internal
488
+ */
339
489
  get name(): string;
490
+ /**
491
+ * @internal
492
+ */
340
493
  get supportedVersion(): {
341
494
  min: string;
342
495
  };
496
+ /**
497
+ * @internal
498
+ */
343
499
  get attributes(): {
344
500
  class: string;
345
501
  };
346
- get mediaControl(): any;
347
- get template(): any;
348
- get label(): string;
349
- get url(): string;
350
- get exposeVersion(): {
351
- label: string;
352
- name: string;
353
- };
502
+ private static readonly template;
503
+ private get label();
504
+ private get url();
505
+ private get exposeVersion();
506
+ /**
507
+ * @internal
508
+ */
354
509
  get events(): {
355
510
  'click [data-version]': string;
356
511
  };
357
- constructor(core: Core);
512
+ constructor(container: Container);
513
+ /**
514
+ * @internal
515
+ */
358
516
  bindEvents(): void;
517
+ /**
518
+ * @internal
519
+ */
359
520
  destroy(): UIObject;
360
- private containerChanged;
361
521
  private toggleContextMenu;
362
522
  private show;
363
523
  private hide;
364
524
  private onOpenMainPage;
525
+ /**
526
+ * @internal
527
+ */
365
528
  render(): this;
529
+ private hideOnBodyClick;
530
+ }
531
+
532
+ export declare interface ContextMenuPluginSettings {
533
+ label?: string;
534
+ url?: string;
535
+ preventShowContextMenu?: boolean;
366
536
  }
367
537
 
368
538
  /**
@@ -372,27 +542,16 @@ export declare class ContextMenu extends UICorePlugin {
372
542
  */
373
543
  export declare type DashSettings = Record<string, unknown>;
374
544
 
375
- export declare class DisableControls extends UICorePlugin {
376
- get name(): string;
377
- get container(): any;
378
- get supportedVersion(): {
379
- min: string;
380
- };
381
- bindEvents(): void;
382
- unbindEvents(): void;
383
- private setDisableStyles;
384
- private onCoreReady;
385
- private enableControls;
386
- private disableAllControls;
387
- }
388
-
389
545
  /**
390
546
  * Adds the DVR controls to the media control UI
391
547
  * @beta
392
548
  *
393
549
  * @remarks
394
- * The plugin is rendered in the {@link MediaControl | media control} UI.
395
- * It renders the live stream indicator and the DVR seek bar if DVR is enabled.
550
+ * Depends on:
551
+ *
552
+ * - {@link MediaControl}
553
+ *
554
+ * The plugin renders the live stream indicator and the DVR seek bar, if DVR is enabled, in the media control UI.
396
555
  */
397
556
  export declare class DvrControls extends UICorePlugin {
398
557
  private static readonly template;
@@ -424,9 +583,7 @@ export declare class DvrControls extends UICorePlugin {
424
583
  * @internal
425
584
  */
426
585
  bindEvents(): void;
427
- private bindCoreEvents;
428
586
  private bindContainerEvents;
429
- private containerChanged;
430
587
  private dvrChanged;
431
588
  private click;
432
589
  private settingsUpdate;
@@ -443,6 +600,10 @@ export declare class DvrControls extends UICorePlugin {
443
600
  */
444
601
  export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
445
602
 
603
+ /**
604
+ * Displays a descriptive error in the overlay on top of the player.
605
+ * @beta
606
+ */
446
607
  export declare class ErrorScreen extends UICorePlugin {
447
608
  private _retry;
448
609
  private err;
@@ -477,6 +638,10 @@ export declare class ErrorScreen extends UICorePlugin {
477
638
  render(): this;
478
639
  }
479
640
 
641
+ /**
642
+ * The plugin adds custom favicon to the player's tab.
643
+ * @beta
644
+ */
480
645
  export declare class Favicon extends CorePlugin {
481
646
  private _container;
482
647
  private oldIcon;
@@ -502,6 +667,7 @@ export declare class Favicon extends CorePlugin {
502
667
 
503
668
  /**
504
669
  * Custom events emitted by the plugin
670
+ * @beta
505
671
  */
506
672
  export declare enum GearEvents {
507
673
  /**
@@ -516,6 +682,10 @@ export declare enum GearEvents {
516
682
  */
517
683
  export declare type GearItemElement = 'quality' | 'rate' | 'nerd';
518
684
 
685
+ /**
686
+ * An example Google Analytics integration plugin
687
+ * @beta
688
+ */
519
689
  export declare class GoogleAnalytics extends ContainerPlugin {
520
690
  private account;
521
691
  private trackerName;
@@ -545,6 +715,14 @@ export declare class GoogleAnalytics extends ContainerPlugin {
545
715
  push(array: string[]): void;
546
716
  }
547
717
 
718
+ /**
719
+ * Telemetry init event data
720
+ * @beta
721
+ */
722
+ export declare interface InitEventData {
723
+ event: TelemetryEvent.Init;
724
+ }
725
+
548
726
  declare type KeyboardEventHandler = (e: KeyboardEvent) => boolean | undefined;
549
727
 
550
728
  /**
@@ -677,6 +855,10 @@ export declare class LevelSelector extends UICorePlugin {
677
855
 
678
856
  export { Logger }
679
857
 
858
+ /**
859
+ * The plugin adds custom logo to the player.
860
+ * @beta
861
+ */
680
862
  export declare class Logo extends UIContainerPlugin {
681
863
  private hasStartedPlaying;
682
864
  private $logoContainer;
@@ -971,7 +1153,7 @@ export declare class MediaControl extends UICorePlugin {
971
1153
  * Media control elements, mount points for additional plugins
972
1154
  * @beta
973
1155
  */
974
- export declare type MediaControlElement = 'bottomGear' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'subtitlesSelector';
1156
+ export declare type MediaControlElement = 'audioTracksSelector' | 'bottomGear' | 'clipText' | 'gear' | 'pip' | 'playbackRate' | 'seekBarContainer' | 'subtitlesSelector';
975
1157
 
976
1158
  declare type MediaSourceInfo = {
977
1159
  live: boolean;
@@ -987,6 +1169,9 @@ declare type MediaSourceInfo = {
987
1169
  */
988
1170
  export declare type MediaTransport = 'dash' | 'hls';
989
1171
 
1172
+ /**
1173
+ * @beta
1174
+ */
990
1175
  declare type Metrics = {
991
1176
  counters: {
992
1177
  play: number;
@@ -1026,8 +1211,14 @@ declare type Metrics = {
1026
1211
  custom: Record<string, unknown>;
1027
1212
  };
1028
1213
 
1214
+ /**
1215
+ * @beta
1216
+ */
1029
1217
  declare type MetricsUpdateFn = (metrics: Metrics) => void;
1030
1218
 
1219
+ /**
1220
+ * The plugin adds support for loading multiple streams and switching between them using the media control UI.
1221
+ */
1031
1222
  export declare class MultiCamera extends UICorePlugin {
1032
1223
  private currentCamera;
1033
1224
  private currentTime;
@@ -1077,22 +1268,50 @@ export declare class MultiCamera extends UICorePlugin {
1077
1268
  private highlightCurrentLevel;
1078
1269
  }
1079
1270
 
1271
+ /**
1272
+ * Enables picture in picture mode.
1273
+ * @beta
1274
+ * @remarks
1275
+ * Depends on:
1276
+ *
1277
+ * - {@link MediaControl}
1278
+ *
1279
+ * It renders a button to toggle picture in picture mode in the media control UI.
1280
+ */
1080
1281
  export declare class PictureInPicture extends UICorePlugin {
1282
+ /**
1283
+ * @internal
1284
+ */
1081
1285
  get name(): string;
1286
+ /**
1287
+ * @internal
1288
+ */
1082
1289
  get supportedVersion(): {
1083
1290
  min: string;
1084
1291
  };
1292
+ /**
1293
+ * @internal
1294
+ */
1085
1295
  static get version(): string;
1296
+ /**
1297
+ * @internal
1298
+ */
1086
1299
  get events(): {
1087
1300
  'click button': string;
1088
1301
  };
1089
- get videoElement(): any;
1302
+ private get videoElement();
1303
+ /**
1304
+ * @internal
1305
+ */
1090
1306
  bindEvents(): void;
1091
1307
  private isPiPSupported;
1308
+ /**
1309
+ * @internal
1310
+ */
1092
1311
  render(): this;
1093
- togglePictureInPicture(): void;
1094
- requestPictureInPicture(): void;
1095
- exitPictureInPicture(): void;
1312
+ private togglePictureInPicture;
1313
+ private requestPictureInPicture;
1314
+ private exitPictureInPicture;
1096
1315
  }
1097
1316
 
1098
1317
  /**
@@ -1155,45 +1374,78 @@ export declare enum PlaybackErrorCode {
1155
1374
  */
1156
1375
  export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
1157
1376
 
1377
+ /**
1378
+ * Allows changing the playback speed of the video.
1379
+ * @beta
1380
+ *
1381
+ * @remarks
1382
+ * Depends on:
1383
+ *
1384
+ * - {@link MediaControl | media_control}
1385
+ *
1386
+ * - {@link BottomGear | bottom_gear}
1387
+ *
1388
+ * It renders a button in the gear menu, which opens a dropdown with the available playback rates.
1389
+ */
1158
1390
  export declare class PlaybackRate extends UICorePlugin {
1159
1391
  private currentPlayback;
1160
1392
  private playbackRates;
1161
1393
  private prevSelectedRate;
1162
1394
  private selectedRate;
1395
+ /**
1396
+ * @internal
1397
+ */
1163
1398
  get name(): string;
1399
+ /**
1400
+ * @internal
1401
+ */
1164
1402
  get supportedVersion(): {
1165
1403
  min: string;
1166
1404
  };
1167
- get template(): any;
1405
+ private static readonly template;
1406
+ private static readonly buttonTemplate;
1407
+ private static readonly listTemplate;
1408
+ /**
1409
+ * @internal
1410
+ */
1168
1411
  get attributes(): {
1169
1412
  class: string;
1170
1413
  'data-playback-rate-select': string;
1171
1414
  };
1415
+ /**
1416
+ * @internal
1417
+ */
1172
1418
  get events(): {
1173
1419
  'click .gear-sub-menu_btn': string;
1174
1420
  'click .gear-option': string;
1175
1421
  'click .go-back': string;
1176
1422
  };
1423
+ /**
1424
+ * @internal
1425
+ */
1177
1426
  bindEvents(): void;
1178
- unBindEvents(): void;
1427
+ private unBindEvents;
1179
1428
  private allRateElements;
1180
1429
  private rateElement;
1181
1430
  private onDashRateChange;
1182
1431
  private updateLiveStatus;
1183
- reload(): void;
1432
+ private reload;
1184
1433
  private shouldRender;
1434
+ /**
1435
+ * @internal
1436
+ */
1185
1437
  render(): this;
1186
- onStartAd(): void;
1187
- onFinishAd(): void;
1188
- onPlay(): void;
1189
- onStop(): void;
1190
- onRateSelect(event: MouseEvent): boolean;
1191
- onShowMenu(): void;
1192
- goBack(): void;
1193
- updatePlaybackRate(rate: string): void;
1194
- setSelectedRate(rate: string): void;
1195
- getTitle(): string;
1196
- highlightCurrentRate(): void;
1438
+ private onStartAd;
1439
+ private onFinishAd;
1440
+ private onPlay;
1441
+ private onStop;
1442
+ private onRateSelect;
1443
+ private onShowMenu;
1444
+ private goBack;
1445
+ private updatePlaybackRate;
1446
+ private setSelectedRate;
1447
+ private getTitle;
1448
+ private highlightCurrentRate;
1197
1449
  }
1198
1450
 
1199
1451
  /**
@@ -1607,15 +1859,6 @@ export declare type PlayerPlugin = {
1607
1859
  name: string;
1608
1860
  };
1609
1861
 
1610
- export declare type PluginSettings = {
1611
- /**
1612
- * Sends the statistics record to the storage.
1613
- * The actual delivery is presumably async and batched.
1614
- * @param data - The statistics record to send.
1615
- */
1616
- send: (data: StatisticsRecord) => void;
1617
- };
1618
-
1619
1862
  /**
1620
1863
  * Displays a poster image in the background and a big play button on top when playback is stopped
1621
1864
  * @beta
@@ -1743,6 +1986,10 @@ export declare interface QualityLevel {
1743
1986
 
1744
1987
  export { reportError_2 as reportError }
1745
1988
 
1989
+ /**
1990
+ * The plugin adds a seek time indicator to the media control UI.
1991
+ * @beta
1992
+ */
1746
1993
  export declare class SeekTime extends UICorePlugin {
1747
1994
  get name(): string;
1748
1995
  get supportedVersion(): {
@@ -1783,6 +2030,9 @@ export { SentryTracer }
1783
2030
 
1784
2031
  export { setTracer }
1785
2032
 
2033
+ /**
2034
+ * The plugin adds a share button to the media control UI.
2035
+ */
1786
2036
  export declare class Share extends UICorePlugin {
1787
2037
  private hide;
1788
2038
  private container;
@@ -1819,6 +2069,9 @@ export declare class Share extends UICorePlugin {
1819
2069
  onShareEmbedClick(): void;
1820
2070
  }
1821
2071
 
2072
+ /**
2073
+ * The plugin adds skip controls to the media control UI.
2074
+ */
1822
2075
  export declare class SkipTime extends UICorePlugin {
1823
2076
  get name(): string;
1824
2077
  get supportedVersion(): {
@@ -1953,49 +2206,33 @@ export declare class SpinnerThreeBounce extends UIContainerPlugin {
1953
2206
  render(): this;
1954
2207
  }
1955
2208
 
1956
- export declare class Statistics extends ContainerPlugin {
1957
- get name(): string;
1958
- get supportedVersion(): {
1959
- min: string;
1960
- };
1961
- private started;
1962
- private timeStart;
1963
- private heatmapSent;
1964
- private heatmapLastTime;
1965
- private watchSent;
1966
- private bufTracking;
1967
- private lags;
2209
+ /**
2210
+ * Playback stall event data
2211
+ * @beta
2212
+ */
2213
+ export declare interface StallEventData {
2214
+ event: TelemetryEvent.Stall;
1968
2215
  /**
1969
- * The time when buffering last started.
2216
+ * Accumulated buffering duration over the measurement interval, ms
1970
2217
  */
1971
- private bufLastStarted;
2218
+ total_ms: number;
1972
2219
  /**
1973
- * The accumulated buffering duration.
2220
+ * Number of stalls
1974
2221
  */
1975
- private bufAccDuration;
1976
- constructor(container: Container);
1977
- bindEvents(): void;
1978
- private startLevelSwitch;
1979
- private stopLevelSwitch;
1980
- private onBuffering;
1981
- private onBufferFull;
1982
- private onReady;
1983
- private initEvent;
1984
- private sendMessage;
1985
- private send;
1986
- private sendHeatmap;
1987
- private onTimeUpdateLive;
1988
- private onStart;
2222
+ count: number;
2223
+ /**
2224
+ * Playback time when the stall is reported at the end of a stall measurement interval, s
2225
+ */
2226
+ time: number;
1989
2227
  }
1990
2228
 
1991
- declare type StatisticsEvent = 'init' | 'start' | 'watch' | 'heatmap';
1992
-
1993
- declare type StatisticsEventData = Record<string, string | number | boolean>;
1994
-
1995
- declare type StatisticsRecord = {
1996
- event: StatisticsEvent;
1997
- type: PlaybackType;
1998
- } & StatisticsEventData;
2229
+ /**
2230
+ * Telemetry start event data
2231
+ * @beta
2232
+ */
2233
+ export declare interface StartEventData {
2234
+ event: TelemetryEvent.Start;
2235
+ }
1999
2236
 
2000
2237
  /**
2001
2238
  * A {@link MediaControl | media control} plugin that provides a UI to select the subtitles when available.
@@ -2105,6 +2342,143 @@ export declare class Subtitles extends UICorePlugin {
2105
2342
  private renderIcon;
2106
2343
  }
2107
2344
 
2345
+ /**
2346
+ * Collects and reports the performance statistics.
2347
+ * @beta
2348
+ * @remarks
2349
+ * This plugin is experimental and its API is likely to change.
2350
+ *
2351
+ * Configuration options {@link TelemetryPluginSettings}
2352
+ *
2353
+ * @example
2354
+ * ```ts
2355
+ * import { Statistics } from '@gcorevideo/player'
2356
+ *
2357
+ * Player.registerPlugin(Statistics)
2358
+ *
2359
+ * const player = new Player({
2360
+ * statistics: {
2361
+ * send: (data) => {
2362
+ * fetch('/stats', {
2363
+ * method: 'POST',
2364
+ * body: JSON.stringify(data),
2365
+ * headers: { 'content-type': 'application/json' },
2366
+ * })
2367
+ * },
2368
+ * },
2369
+ * ...
2370
+ * })
2371
+ * ```
2372
+ */
2373
+ export declare class Telemetry extends ContainerPlugin {
2374
+ /**
2375
+ * The name of the plugin.
2376
+ */
2377
+ get name(): string;
2378
+ /**
2379
+ * The supported version of the plugin.
2380
+ */
2381
+ get supportedVersion(): {
2382
+ min: string;
2383
+ };
2384
+ private started;
2385
+ private timeStart;
2386
+ private stallSent;
2387
+ private stallLastTime;
2388
+ private watchSent;
2389
+ private bufTracking;
2390
+ private numStalls;
2391
+ /**
2392
+ * The time when buffering last started.
2393
+ */
2394
+ private bufLastStarted;
2395
+ /**
2396
+ * The accumulated buffering duration.
2397
+ */
2398
+ private stallAcc;
2399
+ constructor(container: Container);
2400
+ /**
2401
+ * @internal
2402
+ */
2403
+ bindEvents(): void;
2404
+ private startLevelSwitch;
2405
+ private endLevelSwitch;
2406
+ private onBuffering;
2407
+ private onBufferFull;
2408
+ private onReady;
2409
+ private sendInit;
2410
+ private send;
2411
+ private sendStall;
2412
+ private onTimeUpdate;
2413
+ private onStart;
2414
+ }
2415
+
2416
+ /**
2417
+ * Telemetry event type
2418
+ * @beta
2419
+ */
2420
+ export declare enum TelemetryEvent {
2421
+ Init = 1,
2422
+ Start = 2,
2423
+ Watch = 3,
2424
+ Stall = 4
2425
+ }
2426
+
2427
+ /**
2428
+ * Telemetry event data
2429
+ * @beta
2430
+ */
2431
+ export declare type TelemetryEventData = StallEventData | InitEventData | StartEventData | WatchEventData;
2432
+
2433
+ /**
2434
+ * Plugin settings
2435
+ * @beta
2436
+ */
2437
+ export declare interface TelemetryPluginSettings {
2438
+ /**
2439
+ * Sends the statistics record to the storage.
2440
+ * The actual delivery is presumably async and batched.
2441
+ */
2442
+ send: TelemetrySendFn;
2443
+ }
2444
+
2445
+ /**
2446
+ * Telemetry record
2447
+ * @beta
2448
+ */
2449
+ export declare type TelemetryRecord = {
2450
+ type: PlaybackType;
2451
+ } & TelemetryEventData;
2452
+
2453
+ /**
2454
+ * Callback to send the telemetry record to the storage.
2455
+ * @param data - The telemetry record to send.
2456
+ * @beta
2457
+ */
2458
+ declare type TelemetrySendFn = (data: TelemetryRecord) => void;
2459
+
2460
+ /**
2461
+ * Displays the thumbnails of the video when available.
2462
+ * @beta
2463
+ * @example
2464
+ * ```ts
2465
+ * import { Thumbnails } from '@gcorevideo/player'
2466
+ *
2467
+ * Player.registerPlugin(Thumbnails)
2468
+ *
2469
+ * new Player({
2470
+ * thumbnails: {
2471
+ * backdropHeight: 200,
2472
+ * backdropMinOpacity: 0.9,
2473
+ * backdropMaxOpacity: 0.99,
2474
+ * spotlightHeight: 100,
2475
+ * vtt: '1\n00:00:00,000 --> 00:00:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,0,100,56\n\n2\n00:00:10,000 --> 00:00:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,0,100,56\n\n3\n00:00:20,000 --> 00:00:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,0,100,56\n\n4\n00:00:30,000 --> 00:00:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,0,100,56\n\n5\n00:00:40,000 --> 00:00:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,0,100,56\n\n6\n00:00:50,000 --> 00:01:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,0,100,56\n\n7\n00:01:00,000 --> 00:01:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,0,100,56\n\n8\n00:01:10,000 --> 00:01:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,56,100,56\n\n9\n00:01:20,000 --> 00:01:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,56,100,56\n\n10\n00:01:30,000 --> 00:01:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,56,100,56\n\n11\n00:01:40,000 --> 00:01:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,56,100,56\n\n12\n00:01:50,000 --> 00:02:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,56,100,56\n\n13\n00:02:00,000 --> 00:02:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,56,100,56\n\n14\n00:02:10,000 --> 00:02:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,56,100,56\n\n15\n00:02:20,000 --> 00:02:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,112,100,56\n\n16\n00:02:30,000 --> 00:02:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,112,100,56\n\n17\n00:02:40,000 --> 00:02:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,112,100,56\n\n18\n00:02:50,000 --> 00:03:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,112,100,56\n\n19\n00:03:00,000 --> 00:03:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,112,100,56\n\n20\n00:03:10,000 --> 00:03:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,112,100,56\n\n21\n00:03:20,000 --> 00:03:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,112,100,56\n\n22\n00:03:30,000 --> 00:03:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,168,100,56\n\n23\n00:03:40,000 --> 00:03:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,168,100,56\n\n24\n00:03:50,000 --> 00:04:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,168,100,56\n\n25\n00:04:00,000 --> 00:04:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,168,100,56\n\n26\n00:04:10,000 --> 00:04:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,168,100,56\n\n27\n00:04:20,000 --> 00:04:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,168,100,56\n\n28\n00:04:30,000 --> 00:04:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,168,100,56\n\n29\n00:04:40,000 --> 00:04:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,224,100,56\n\n30\n00:04:50,000 --> 00:05:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,224,100,56\n\n31\n00:05:00,000 --> 00:05:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,224,100,56\n\n32\n00:05:10,000 --> 00:05:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,224,100,56\n\n33\n00:05:20,000 --> 00:05:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,224,100,56\n\n34\n00:05:30,000 --> 00:05:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,224,100,56\n\n35\n00:05:40,000 --> 00:05:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,224,100,56\n\n36\n00:05:50,000 --> 00:06:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,280,100,56\n\n37\n00:06:00,000 --> 00:06:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,280,100,56\n\n38\n00:06:10,000 --> 00:06:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,280,100,56\n\n39\n00:06:20,000 --> 00:06:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,280,100,56\n\n40\n00:06:30,000 --> 00:06:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,280,100,56\n\n41\n00:06:40,000 --> 00:06:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,280,100,56\n\n42\n00:06:50,000 --> 00:07:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,280,100,56\n\n43\n00:07:00,000 --> 00:07:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,336,100,56\n\n44\n00:07:10,000 --> 00:07:20,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,336,100,56\n\n45\n00:07:20,000 --> 00:07:30,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,336,100,56\n\n46\n00:07:30,000 --> 00:07:40,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,336,100,56\n\n47\n00:07:40,000 --> 00:07:50,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,336,100,56\n\n48\n00:07:50,000 --> 00:08:00,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,336,100,56\n\n49\n00:08:00,000 --> 00:08:10,000\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,336,100,56\n',
2476
+ * sprite:
2477
+ * 'https://static.gvideo.co/videoplatform/sprites/2675/2452164_3dk4NsRt6vWsffEr.mp4_sprite.jpg',
2478
+ * },
2479
+ * })
2480
+ * ```
2481
+ */
2108
2482
  export declare class Thumbnails extends UICorePlugin {
2109
2483
  private _$spotlight;
2110
2484
  private _$backdrop;
@@ -2119,15 +2493,27 @@ export declare class Thumbnails extends UICorePlugin {
2119
2493
  private _thumbsLoaded;
2120
2494
  private _oldContainer;
2121
2495
  private _thumbs;
2496
+ /**
2497
+ * @internal
2498
+ */
2122
2499
  get name(): string;
2500
+ /**
2501
+ * @internal
2502
+ */
2123
2503
  get supportedVersion(): {
2124
2504
  min: string;
2125
2505
  };
2506
+ /**
2507
+ * @internal
2508
+ */
2126
2509
  get attributes(): {
2127
2510
  class: string;
2128
2511
  };
2129
- get template(): any;
2512
+ private static readonly template;
2130
2513
  private buildSpriteConfig;
2514
+ /**
2515
+ * @internal
2516
+ */
2131
2517
  bindEvents(): void;
2132
2518
  private _bindContainerEvents;
2133
2519
  private _onCoreReady;
@@ -2141,7 +2527,7 @@ export declare class Thumbnails extends UICorePlugin {
2141
2527
  private _calculateHoverPosition;
2142
2528
  private _buildImg;
2143
2529
  private _loadBackdrop;
2144
- setText(time: TimeValue): void;
2530
+ private setText;
2145
2531
  private _updateCarousel;
2146
2532
  private _updateSpotlightThumb;
2147
2533
  private _getThumbIndexForTime;
@@ -2149,6 +2535,19 @@ export declare class Thumbnails extends UICorePlugin {
2149
2535
  private _createElements;
2150
2536
  }
2151
2537
 
2538
+ /**
2539
+ * Plugin configuration options for the thumbnails plugin.
2540
+ * @beta
2541
+ */
2542
+ export declare type ThumbnailsPluginSettings = {
2543
+ backdropHeight: number;
2544
+ backdropMaxOpacity: number;
2545
+ backdropMinOpacity: number;
2546
+ spotlightHeight: number;
2547
+ sprite: string;
2548
+ vtt: string;
2549
+ };
2550
+
2152
2551
  /**
2153
2552
  * Current playback time and total duration of the media.
2154
2553
  * @beta
@@ -2245,6 +2644,7 @@ export declare function version(): {
2245
2644
  };
2246
2645
 
2247
2646
  /**
2647
+ * Applies fade effect to the player's volume change.
2248
2648
  * @beta
2249
2649
  */
2250
2650
  export declare class VolumeFade extends UICorePlugin {
@@ -2252,9 +2652,15 @@ export declare class VolumeFade extends UICorePlugin {
2252
2652
  private container;
2253
2653
  private delay;
2254
2654
  private interval;
2655
+ /**
2656
+ * @internal
2657
+ */
2255
2658
  get name(): string;
2659
+ /**
2660
+ * @internal
2661
+ */
2256
2662
  bindEvents(): void;
2257
- unBindEvents(): void;
2663
+ private unBindEvents;
2258
2664
  private _onUserChangeVolume;
2259
2665
  private _onVolumeConfig;
2260
2666
  private onCoreReady;
@@ -2268,6 +2674,14 @@ export declare enum VolumeFadeEvents {
2268
2674
  FADE = "core:volume:fade"
2269
2675
  }
2270
2676
 
2677
+ /**
2678
+ * Telemetry watch event data
2679
+ * @beta
2680
+ */
2681
+ export declare interface WatchEventData {
2682
+ event: TelemetryEvent.Watch;
2683
+ }
2684
+
2271
2685
  /**
2272
2686
  * @beta
2273
2687
  */