@gcorevideo/player 2.19.6 → 2.19.8

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 (460) hide show
  1. package/README.md +3 -7
  2. package/build/vite-raw-plugin.js +1 -1
  3. package/dist/core.js +1 -1
  4. package/dist/index.css +826 -826
  5. package/dist/index.js +105 -49
  6. package/dist/player.d.ts +1977 -0
  7. package/dist/plugins/index.css +1388 -1388
  8. package/dist/plugins/index.js +104 -48
  9. package/docs/api/player.audioselector.attributes.md +17 -0
  10. package/docs/api/player.audioselector.bindevents.md +18 -0
  11. package/docs/api/player.audioselector.events.md +17 -0
  12. package/docs/api/player.audioselector.hideselecttrackmenu.md +18 -0
  13. package/docs/api/player.audioselector.highlightcurrenttrack.md +18 -0
  14. package/docs/api/player.audioselector.md +329 -0
  15. package/docs/api/player.audioselector.name.md +14 -0
  16. package/docs/api/player.audioselector.onshowlevelselectmenu.md +18 -0
  17. package/docs/api/player.audioselector.reload.md +18 -0
  18. package/docs/api/player.audioselector.render.md +18 -0
  19. package/docs/api/player.audioselector.starttrackswitch.md +18 -0
  20. package/docs/api/player.audioselector.supportedversion.md +16 -0
  21. package/docs/api/player.audioselector.template.md +14 -0
  22. package/docs/api/player.audioselector.togglecontextmenu.md +18 -0
  23. package/docs/api/player.audioselector.unbindevents.md +18 -0
  24. package/docs/api/player.audioselector.updatecurrenttrack.md +66 -0
  25. package/docs/api/player.audioselector.version.md +14 -0
  26. package/docs/api/player.bigmutebutton.bindevents.md +18 -0
  27. package/docs/api/player.bigmutebutton.events.md +17 -0
  28. package/docs/api/player.bigmutebutton.md +173 -0
  29. package/docs/api/player.bigmutebutton.name.md +14 -0
  30. package/docs/api/player.bigmutebutton.render.md +18 -0
  31. package/docs/api/player.bigmutebutton.supportedversion.md +16 -0
  32. package/docs/api/player.bigmutebutton.template.md +14 -0
  33. package/docs/api/player.bottomgear.attributes.md +17 -0
  34. package/docs/api/player.bottomgear.bindevents.md +18 -0
  35. package/docs/api/player.bottomgear.container.md +14 -0
  36. package/docs/api/player.bottomgear.events.md +16 -0
  37. package/docs/api/player.bottomgear.hide.md +18 -0
  38. package/docs/api/player.bottomgear.md +308 -0
  39. package/docs/api/player.bottomgear.name.md +14 -0
  40. package/docs/api/player.bottomgear.refresh.md +18 -0
  41. package/docs/api/player.bottomgear.reload.md +18 -0
  42. package/docs/api/player.bottomgear.render.md +18 -0
  43. package/docs/api/player.bottomgear.supportedversion.md +16 -0
  44. package/docs/api/player.bottomgear.template.md +14 -0
  45. package/docs/api/player.bottomgear.togglegearmenu.md +18 -0
  46. package/docs/api/player.bottomgear.unbindevents.md +18 -0
  47. package/docs/api/player.bottomgear.version.md +14 -0
  48. package/docs/api/player.clapprnerdstats._constructor_.md +50 -0
  49. package/docs/api/player.clapprnerdstats.attributes.md +17 -0
  50. package/docs/api/player.clapprnerdstats.bindevents.md +18 -0
  51. package/docs/api/player.clapprnerdstats.events.md +18 -0
  52. package/docs/api/player.clapprnerdstats.md +312 -0
  53. package/docs/api/player.clapprnerdstats.name.md +14 -0
  54. package/docs/api/player.clapprnerdstats.playerheight.md +14 -0
  55. package/docs/api/player.clapprnerdstats.playerwidth.md +14 -0
  56. package/docs/api/player.clapprnerdstats.render.md +18 -0
  57. package/docs/api/player.clapprnerdstats.statsboxelem.md +14 -0
  58. package/docs/api/player.clapprnerdstats.statsboxwidththreshold.md +14 -0
  59. package/docs/api/player.clapprnerdstats.supportedversion.md +16 -0
  60. package/docs/api/player.clapprnerdstats.template.md +14 -0
  61. package/docs/api/player.clapprstats._buildreport.md +18 -0
  62. package/docs/api/player.clapprstats._constructor_.md +50 -0
  63. package/docs/api/player.clapprstats._defaultreport.md +52 -0
  64. package/docs/api/player.clapprstats._playbackname.md +14 -0
  65. package/docs/api/player.clapprstats._playbacktype.md +14 -0
  66. package/docs/api/player.clapprstats.bindevents.md +18 -0
  67. package/docs/api/player.clapprstats.destroy.md +18 -0
  68. package/docs/api/player.clapprstats.exportmetrics.md +18 -0
  69. package/docs/api/player.clapprstats.md +333 -0
  70. package/docs/api/player.clapprstats.name.md +14 -0
  71. package/docs/api/player.clapprstats.onbitrate.md +52 -0
  72. package/docs/api/player.clapprstats.onfirstplaying.md +18 -0
  73. package/docs/api/player.clapprstats.playafterpause.md +18 -0
  74. package/docs/api/player.clapprstats.setupdatemetrics.md +52 -0
  75. package/docs/api/player.clapprstats.starttimers.md +18 -0
  76. package/docs/api/player.clapprstats.stopreporting.md +18 -0
  77. package/docs/api/player.clapprstats.supportedversion.md +16 -0
  78. package/docs/api/player.clicktopause.bindevents.md +15 -0
  79. package/docs/api/player.clicktopause.config.md +11 -0
  80. package/docs/api/player.clicktopause.md +126 -0
  81. package/docs/api/player.clicktopause.name.md +11 -0
  82. package/docs/api/player.clicktopause.supportedversion.md +13 -0
  83. package/docs/api/player.clipsplugin.attributes.md +13 -0
  84. package/docs/api/player.clipsplugin.bindevents.md +15 -0
  85. package/docs/api/player.clipsplugin.gettext.md +49 -0
  86. package/docs/api/player.clipsplugin.makesvg.md +49 -0
  87. package/docs/api/player.clipsplugin.md +143 -0
  88. package/docs/api/player.clipsplugin.name.md +11 -0
  89. package/docs/api/player.clipsplugin.unbindevents.md +15 -0
  90. package/docs/api/player.contextmenu._constructor_.md +47 -0
  91. package/docs/api/player.contextmenu.attributes.md +13 -0
  92. package/docs/api/player.contextmenu.bindevents.md +15 -0
  93. package/docs/api/player.contextmenu.destroy.md +15 -0
  94. package/docs/api/player.contextmenu.events.md +13 -0
  95. package/docs/api/player.contextmenu.exposeversion.md +14 -0
  96. package/docs/api/player.contextmenu.label.md +11 -0
  97. package/docs/api/player.contextmenu.md +298 -0
  98. package/docs/api/player.contextmenu.mediacontrol.md +11 -0
  99. package/docs/api/player.contextmenu.name.md +11 -0
  100. package/docs/api/player.contextmenu.render.md +15 -0
  101. package/docs/api/player.contextmenu.supportedversion.md +13 -0
  102. package/docs/api/player.contextmenu.template.md +11 -0
  103. package/docs/api/player.contextmenu.url.md +11 -0
  104. package/docs/api/player.disablecontrols.bindevents.md +15 -0
  105. package/docs/api/player.disablecontrols.container.md +11 -0
  106. package/docs/api/player.disablecontrols.md +138 -0
  107. package/docs/api/player.disablecontrols.name.md +11 -0
  108. package/docs/api/player.disablecontrols.supportedversion.md +13 -0
  109. package/docs/api/player.disablecontrols.unbindevents.md +15 -0
  110. package/docs/api/player.dvrcontrols._constructor_.md +47 -0
  111. package/docs/api/player.dvrcontrols.attributes.md +14 -0
  112. package/docs/api/player.dvrcontrols.bindevents.md +15 -0
  113. package/docs/api/player.dvrcontrols.click.md +15 -0
  114. package/docs/api/player.dvrcontrols.events.md +13 -0
  115. package/docs/api/player.dvrcontrols.md +246 -0
  116. package/docs/api/player.dvrcontrols.name.md +11 -0
  117. package/docs/api/player.dvrcontrols.render.md +15 -0
  118. package/docs/api/player.dvrcontrols.settingsupdate.md +15 -0
  119. package/docs/api/player.dvrcontrols.shouldrender.md +15 -0
  120. package/docs/api/player.dvrcontrols.supportedversion.md +13 -0
  121. package/docs/api/player.dvrcontrols.template.md +11 -0
  122. package/docs/api/player.errorscreen.attributes.md +14 -0
  123. package/docs/api/player.errorscreen.bindevents.md +15 -0
  124. package/docs/api/player.errorscreen.container.md +11 -0
  125. package/docs/api/player.errorscreen.hide.md +15 -0
  126. package/docs/api/player.errorscreen.md +212 -0
  127. package/docs/api/player.errorscreen.name.md +11 -0
  128. package/docs/api/player.errorscreen.render.md +15 -0
  129. package/docs/api/player.errorscreen.show.md +51 -0
  130. package/docs/api/player.errorscreen.supportedversion.md +13 -0
  131. package/docs/api/player.errorscreen.template.md +11 -0
  132. package/docs/api/player.errorscreen.unbindevents.md +15 -0
  133. package/docs/api/player.favicon._constructor_.md +47 -0
  134. package/docs/api/player.favicon.bindevents.md +15 -0
  135. package/docs/api/player.favicon.configure.md +15 -0
  136. package/docs/api/player.favicon.destroy.md +15 -0
  137. package/docs/api/player.favicon.disable.md +15 -0
  138. package/docs/api/player.favicon.md +177 -0
  139. package/docs/api/player.favicon.name.md +11 -0
  140. package/docs/api/player.favicon.supportedversion.md +13 -0
  141. package/docs/api/player.googleanalytics._constructor_.md +47 -0
  142. package/docs/api/player.googleanalytics.addeventlisteners.md +15 -0
  143. package/docs/api/player.googleanalytics.embedscript.md +15 -0
  144. package/docs/api/player.googleanalytics.md +321 -0
  145. package/docs/api/player.googleanalytics.name.md +11 -0
  146. package/docs/api/player.googleanalytics.onbufferfull.md +15 -0
  147. package/docs/api/player.googleanalytics.onbuffering.md +15 -0
  148. package/docs/api/player.googleanalytics.ondvr.md +49 -0
  149. package/docs/api/player.googleanalytics.onended.md +15 -0
  150. package/docs/api/player.googleanalytics.onerror.md +15 -0
  151. package/docs/api/player.googleanalytics.onfullscreen.md +15 -0
  152. package/docs/api/player.googleanalytics.onhd.md +49 -0
  153. package/docs/api/player.googleanalytics.onpause.md +15 -0
  154. package/docs/api/player.googleanalytics.onplay.md +15 -0
  155. package/docs/api/player.googleanalytics.onready.md +15 -0
  156. package/docs/api/player.googleanalytics.onseek.md +15 -0
  157. package/docs/api/player.googleanalytics.onstop.md +15 -0
  158. package/docs/api/player.googleanalytics.onvolumechanged.md +15 -0
  159. package/docs/api/player.googleanalytics.push.md +49 -0
  160. package/docs/api/player.googleanalytics.supportedversion.md +13 -0
  161. package/docs/api/player.levelselector.attributes.md +17 -0
  162. package/docs/api/player.levelselector.bindevents.md +18 -0
  163. package/docs/api/player.levelselector.events.md +18 -0
  164. package/docs/api/player.levelselector.md +217 -0
  165. package/docs/api/player.levelselector.name.md +14 -0
  166. package/docs/api/player.levelselector.render.md +18 -0
  167. package/docs/api/player.levelselector.supportedversion.md +16 -0
  168. package/docs/api/player.levelselector.version.md +14 -0
  169. package/docs/api/player.logo._constructor_.md +47 -0
  170. package/docs/api/player.logo.attributes.md +14 -0
  171. package/docs/api/player.logo.bindevents.md +15 -0
  172. package/docs/api/player.logo.md +203 -0
  173. package/docs/api/player.logo.name.md +11 -0
  174. package/docs/api/player.logo.render.md +15 -0
  175. package/docs/api/player.logo.stoplistening.md +15 -0
  176. package/docs/api/player.logo.supportedversion.md +13 -0
  177. package/docs/api/player.logo.template.md +11 -0
  178. package/docs/api/player.md +319 -0
  179. package/docs/api/player.mediacontrol._constructor_.md +50 -0
  180. package/docs/api/player.mediacontrol.attributes.md +17 -0
  181. package/docs/api/player.mediacontrol.bindcontainerevents.md +18 -0
  182. package/docs/api/player.mediacontrol.bindevents.md +18 -0
  183. package/docs/api/player.mediacontrol.container.md +14 -0
  184. package/docs/api/player.mediacontrol.destroy.md +18 -0
  185. package/docs/api/player.mediacontrol.disable.md +18 -0
  186. package/docs/api/player.mediacontrol.disabled.md +14 -0
  187. package/docs/api/player.mediacontrol.disabledcontrolbutton.md +20 -0
  188. package/docs/api/player.mediacontrol.enable.md +18 -0
  189. package/docs/api/player.mediacontrol.enablecontrolbutton.md +20 -0
  190. package/docs/api/player.mediacontrol.events.md +40 -0
  191. package/docs/api/player.mediacontrol.getelement.md +58 -0
  192. package/docs/api/player.mediacontrol.getexternalinterface.md +21 -0
  193. package/docs/api/player.mediacontrol.md +513 -0
  194. package/docs/api/player.mediacontrol.muted.md +16 -0
  195. package/docs/api/player.mediacontrol.name.md +14 -0
  196. package/docs/api/player.mediacontrol.pause.md +20 -0
  197. package/docs/api/player.mediacontrol.play.md +20 -0
  198. package/docs/api/player.mediacontrol.playback.md +14 -0
  199. package/docs/api/player.mediacontrol.render.md +18 -0
  200. package/docs/api/player.mediacontrol.setinitialvolume.md +20 -0
  201. package/docs/api/player.mediacontrol.setmuted.md +52 -0
  202. package/docs/api/player.mediacontrol.setvolume.md +76 -0
  203. package/docs/api/player.mediacontrol.stop.md +20 -0
  204. package/docs/api/player.mediacontrol.supportedversion.md +16 -0
  205. package/docs/api/player.mediacontrol.volume.md +16 -0
  206. package/docs/api/player.mediacontrolelement.md +15 -0
  207. package/docs/api/player.multicamera._constructor_.md +47 -0
  208. package/docs/api/player.multicamera.activebyid.md +63 -0
  209. package/docs/api/player.multicamera.attributes.md +14 -0
  210. package/docs/api/player.multicamera.bindevents.md +15 -0
  211. package/docs/api/player.multicamera.events.md +14 -0
  212. package/docs/api/player.multicamera.getcameraslist.md +15 -0
  213. package/docs/api/player.multicamera.getcurrentcamera.md +15 -0
  214. package/docs/api/player.multicamera.md +279 -0
  215. package/docs/api/player.multicamera.name.md +11 -0
  216. package/docs/api/player.multicamera.render.md +15 -0
  217. package/docs/api/player.multicamera.supportedversion.md +13 -0
  218. package/docs/api/player.multicamera.template.md +11 -0
  219. package/docs/api/player.multicamera.unbindevents.md +15 -0
  220. package/docs/api/player.multicamera.version.md +11 -0
  221. package/docs/api/player.pictureinpicture.bindevents.md +15 -0
  222. package/docs/api/player.pictureinpicture.events.md +13 -0
  223. package/docs/api/player.pictureinpicture.exitpictureinpicture.md +15 -0
  224. package/docs/api/player.pictureinpicture.md +214 -0
  225. package/docs/api/player.pictureinpicture.name.md +11 -0
  226. package/docs/api/player.pictureinpicture.render.md +15 -0
  227. package/docs/api/player.pictureinpicture.requestpictureinpicture.md +15 -0
  228. package/docs/api/player.pictureinpicture.supportedversion.md +13 -0
  229. package/docs/api/player.pictureinpicture.togglepictureinpicture.md +15 -0
  230. package/docs/api/player.pictureinpicture.version.md +11 -0
  231. package/docs/api/player.pictureinpicture.videoelement.md +11 -0
  232. package/docs/api/player.playbackrate.attributes.md +14 -0
  233. package/docs/api/player.playbackrate.bindevents.md +15 -0
  234. package/docs/api/player.playbackrate.events.md +15 -0
  235. package/docs/api/player.playbackrate.gettitle.md +15 -0
  236. package/docs/api/player.playbackrate.goback.md +15 -0
  237. package/docs/api/player.playbackrate.highlightcurrentrate.md +15 -0
  238. package/docs/api/player.playbackrate.md +332 -0
  239. package/docs/api/player.playbackrate.name.md +11 -0
  240. package/docs/api/player.playbackrate.onfinishad.md +15 -0
  241. package/docs/api/player.playbackrate.onplay.md +15 -0
  242. package/docs/api/player.playbackrate.onrateselect.md +49 -0
  243. package/docs/api/player.playbackrate.onshowmenu.md +15 -0
  244. package/docs/api/player.playbackrate.onstartad.md +15 -0
  245. package/docs/api/player.playbackrate.onstop.md +15 -0
  246. package/docs/api/player.playbackrate.reload.md +15 -0
  247. package/docs/api/player.playbackrate.render.md +15 -0
  248. package/docs/api/player.playbackrate.setselectedrate.md +49 -0
  249. package/docs/api/player.playbackrate.supportedversion.md +13 -0
  250. package/docs/api/player.playbackrate.template.md +11 -0
  251. package/docs/api/player.playbackrate.unbindevents.md +15 -0
  252. package/docs/api/player.playbackrate.updateplaybackrate.md +49 -0
  253. package/docs/api/player.pluginsettings.md +13 -0
  254. package/docs/api/player.poster.attributes.md +14 -0
  255. package/docs/api/player.poster.bindevents.md +15 -0
  256. package/docs/api/player.poster.destroy.md +15 -0
  257. package/docs/api/player.poster.disable.md +15 -0
  258. package/docs/api/player.poster.enable.md +15 -0
  259. package/docs/api/player.poster.events.md +13 -0
  260. package/docs/api/player.poster.md +250 -0
  261. package/docs/api/player.poster.name.md +11 -0
  262. package/docs/api/player.poster.render.md +15 -0
  263. package/docs/api/player.poster.shouldrender.md +11 -0
  264. package/docs/api/player.poster.showonvideoend.md +11 -0
  265. package/docs/api/player.poster.supportedversion.md +13 -0
  266. package/docs/api/player.poster.template.md +11 -0
  267. package/docs/api/player.seektime.attributes.md +14 -0
  268. package/docs/api/player.seektime.bindevents.md +15 -0
  269. package/docs/api/player.seektime.durationshown.md +11 -0
  270. package/docs/api/player.seektime.getseektime.md +17 -0
  271. package/docs/api/player.seektime.islivestreamwithdvr.md +11 -0
  272. package/docs/api/player.seektime.md +269 -0
  273. package/docs/api/player.seektime.mediacontrol.md +11 -0
  274. package/docs/api/player.seektime.mediacontrolcontainer.md +11 -0
  275. package/docs/api/player.seektime.name.md +11 -0
  276. package/docs/api/player.seektime.render.md +15 -0
  277. package/docs/api/player.seektime.shouldbevisible.md +15 -0
  278. package/docs/api/player.seektime.supportedversion.md +13 -0
  279. package/docs/api/player.seektime.template.md +11 -0
  280. package/docs/api/player.seektime.update.md +15 -0
  281. package/docs/api/player.share.attributes.md +14 -0
  282. package/docs/api/player.share.bindevents.md +15 -0
  283. package/docs/api/player.share.canshowshare.md +15 -0
  284. package/docs/api/player.share.events.md +18 -0
  285. package/docs/api/player.share.hideshare.md +15 -0
  286. package/docs/api/player.share.initializeicons.md +15 -0
  287. package/docs/api/player.share.md +308 -0
  288. package/docs/api/player.share.name.md +11 -0
  289. package/docs/api/player.share.onshareembedclick.md +15 -0
  290. package/docs/api/player.share.onsharefb.md +15 -0
  291. package/docs/api/player.share.onsharehide.md +15 -0
  292. package/docs/api/player.share.onsharelinkclick.md +15 -0
  293. package/docs/api/player.share.onshareshow.md +15 -0
  294. package/docs/api/player.share.onsharetw.md +15 -0
  295. package/docs/api/player.share.render.md +15 -0
  296. package/docs/api/player.share.showshare.md +15 -0
  297. package/docs/api/player.share.supportedversion.md +13 -0
  298. package/docs/api/player.share.template.md +11 -0
  299. package/docs/api/player.share.unbindevents.md +15 -0
  300. package/docs/api/player.skiptime.attributes.md +14 -0
  301. package/docs/api/player.skiptime.bindevents.md +15 -0
  302. package/docs/api/player.skiptime.container.md +11 -0
  303. package/docs/api/player.skiptime.events.md +15 -0
  304. package/docs/api/player.skiptime.handlerewindclicks.md +15 -0
  305. package/docs/api/player.skiptime.md +255 -0
  306. package/docs/api/player.skiptime.name.md +11 -0
  307. package/docs/api/player.skiptime.render.md +15 -0
  308. package/docs/api/player.skiptime.setback.md +15 -0
  309. package/docs/api/player.skiptime.setforward.md +15 -0
  310. package/docs/api/player.skiptime.setmidclick.md +15 -0
  311. package/docs/api/player.skiptime.supportedversion.md +13 -0
  312. package/docs/api/player.skiptime.template.md +11 -0
  313. package/docs/api/player.skiptime.togglefullscreen.md +15 -0
  314. package/docs/api/player.sourcecontroller._constructor_.md +50 -0
  315. package/docs/api/player.sourcecontroller.md +156 -0
  316. package/docs/api/player.sourcecontroller.name.md +14 -0
  317. package/docs/api/player.sourcecontroller.supportedversion.md +16 -0
  318. package/docs/api/player.sourcecontroller.version.md +14 -0
  319. package/docs/api/player.spinnerthreebounce._constructor_.md +47 -0
  320. package/docs/api/player.spinnerthreebounce.attributes.md +14 -0
  321. package/docs/api/player.spinnerthreebounce.hide.md +15 -0
  322. package/docs/api/player.spinnerthreebounce.md +184 -0
  323. package/docs/api/player.spinnerthreebounce.name.md +11 -0
  324. package/docs/api/player.spinnerthreebounce.render.md +15 -0
  325. package/docs/api/player.spinnerthreebounce.show.md +51 -0
  326. package/docs/api/player.spinnerthreebounce.supportedversion.md +13 -0
  327. package/docs/api/player.statistics._constructor_.md +47 -0
  328. package/docs/api/player.statistics.bindevents.md +15 -0
  329. package/docs/api/player.statistics.md +141 -0
  330. package/docs/api/player.statistics.name.md +11 -0
  331. package/docs/api/player.statistics.supportedversion.md +13 -0
  332. package/docs/api/player.subtitles.attributes.md +14 -0
  333. package/docs/api/player.subtitles.bindevents.md +15 -0
  334. package/docs/api/player.subtitles.buttonelement.md +15 -0
  335. package/docs/api/player.subtitles.events.md +14 -0
  336. package/docs/api/player.subtitles.hide.md +15 -0
  337. package/docs/api/player.subtitles.levelelement.md +51 -0
  338. package/docs/api/player.subtitles.md +343 -0
  339. package/docs/api/player.subtitles.name.md +11 -0
  340. package/docs/api/player.subtitles.preselectedlanguage.md +11 -0
  341. package/docs/api/player.subtitles.reload.md +15 -0
  342. package/docs/api/player.subtitles.render.md +15 -0
  343. package/docs/api/player.subtitles.selectsubtitles.md +15 -0
  344. package/docs/api/player.subtitles.show.md +15 -0
  345. package/docs/api/player.subtitles.startlevelswitch.md +15 -0
  346. package/docs/api/player.subtitles.stoplevelswitch.md +15 -0
  347. package/docs/api/player.subtitles.supportedversion.md +13 -0
  348. package/docs/api/player.subtitles.template.md +11 -0
  349. package/docs/api/player.subtitles.templatestring.md +11 -0
  350. package/docs/api/player.subtitles.unbindevents.md +15 -0
  351. package/docs/api/player.subtitles.version.md +11 -0
  352. package/docs/api/player.thumbnails.attributes.md +13 -0
  353. package/docs/api/player.thumbnails.bindevents.md +15 -0
  354. package/docs/api/player.thumbnails.md +157 -0
  355. package/docs/api/player.thumbnails.name.md +11 -0
  356. package/docs/api/player.thumbnails.settext.md +49 -0
  357. package/docs/api/player.thumbnails.supportedversion.md +13 -0
  358. package/docs/api/player.thumbnails.template.md +11 -0
  359. package/docs/api/player.volumefade.bindevents.md +18 -0
  360. package/docs/api/player.volumefade.md +110 -0
  361. package/docs/api/player.volumefade.name.md +14 -0
  362. package/docs/api/player.volumefade.unbindevents.md +18 -0
  363. package/docs/api/player.volumefadeevents.md +45 -0
  364. package/docs/api/player.zeptoresult.md +15 -0
  365. package/lib/index.core.d.ts +1 -9
  366. package/lib/index.core.d.ts.map +1 -1
  367. package/lib/index.core.js +1 -9
  368. package/lib/index.d.ts +9 -0
  369. package/lib/index.d.ts.map +1 -1
  370. package/lib/index.js +9 -0
  371. package/lib/index.plugins.d.ts +0 -5
  372. package/lib/index.plugins.d.ts.map +1 -1
  373. package/lib/index.plugins.js +0 -5
  374. package/lib/internal.types.d.ts +1 -1
  375. package/lib/internal.types.d.ts.map +1 -1
  376. package/lib/plugins/audio-selector/AudioSelector.d.ts +3 -0
  377. package/lib/plugins/audio-selector/AudioSelector.d.ts.map +1 -1
  378. package/lib/plugins/audio-selector/AudioSelector.js +3 -0
  379. package/lib/plugins/big-mute-button/BigMuteButton.d.ts +4 -1
  380. package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
  381. package/lib/plugins/big-mute-button/BigMuteButton.js +3 -0
  382. package/lib/plugins/bottom-gear/BottomGear.d.ts +3 -0
  383. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  384. package/lib/plugins/bottom-gear/BottomGear.js +3 -0
  385. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +3 -0
  386. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
  387. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +3 -0
  388. package/lib/plugins/clappr-stats/ClapprStats.d.ts +4 -1
  389. package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
  390. package/lib/plugins/clappr-stats/ClapprStats.js +3 -0
  391. package/lib/plugins/clips/Clips.d.ts +3 -0
  392. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  393. package/lib/plugins/clips/Clips.js +22 -2
  394. package/lib/plugins/kibo/index.d.ts +3 -0
  395. package/lib/plugins/kibo/index.d.ts.map +1 -1
  396. package/lib/plugins/kibo/index.js +3 -0
  397. package/lib/plugins/level-selector/LevelSelector.d.ts +0 -3
  398. package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
  399. package/lib/plugins/level-selector/LevelSelector.js +2 -10
  400. package/lib/plugins/media-control/MediaControl.d.ts +95 -54
  401. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  402. package/lib/plugins/media-control/MediaControl.js +60 -37
  403. package/lib/plugins/source-controller/SourceController.js +1 -1
  404. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
  405. package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
  406. package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
  407. package/lib/plugins/thumbnails/Thumbnails.d.ts +1 -1
  408. package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
  409. package/lib/plugins/vast-ads/roll.d.ts +1 -1
  410. package/lib/plugins/vast-ads/roll.d.ts.map +1 -1
  411. package/lib/plugins/vast-ads/rollmanager.d.ts +1 -1
  412. package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -1
  413. package/lib/plugins/volume-fade/VolumeFade.d.ts +3 -0
  414. package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
  415. package/lib/plugins/volume-fade/VolumeFade.js +3 -0
  416. package/lib/tsdoc-metadata.json +11 -0
  417. package/lib/types.d.ts.map +1 -1
  418. package/lib/utils/types.d.ts +6 -0
  419. package/lib/utils/types.d.ts.map +1 -1
  420. package/package.json +1 -1
  421. package/src/index.core.ts +1 -10
  422. package/src/index.plugins.ts +0 -6
  423. package/src/index.ts +9 -0
  424. package/src/internal.types.ts +1 -1
  425. package/src/plugins/audio-selector/AudioSelector.ts +4 -1
  426. package/src/plugins/big-mute-button/BigMuteButton.ts +5 -2
  427. package/src/plugins/bottom-gear/BottomGear.ts +3 -0
  428. package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +4 -1
  429. package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +1 -1
  430. package/src/plugins/clappr-stats/ClapprStats.ts +5 -2
  431. package/src/plugins/clips/Clips.ts +29 -3
  432. package/src/plugins/error-screen/ErrorScreen.ts +1 -1
  433. package/src/plugins/favicon/Favicon.ts +1 -1
  434. package/src/plugins/kibo/index.ts +3 -0
  435. package/src/plugins/level-selector/LevelSelector.ts +5 -15
  436. package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +185 -37
  437. package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +187 -1
  438. package/src/plugins/logo/Logo.ts +1 -1
  439. package/src/plugins/media-control/MediaControl.ts +114 -94
  440. package/src/plugins/multi-camera/MultiCamera.ts +1 -1
  441. package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
  442. package/src/plugins/poster/Poster.ts +2 -2
  443. package/src/plugins/seek-time/SeekTime.ts +2 -2
  444. package/src/plugins/source-controller/SourceController.ts +1 -1
  445. package/src/plugins/source-controller/__tests__/SourceController.test.ts +2 -1
  446. package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +2 -2
  447. package/src/plugins/statistics/Statistics.ts +1 -1
  448. package/src/plugins/subtitles/Subtitles.ts +2 -2
  449. package/src/plugins/thumbnails/Thumbnails.ts +2 -2
  450. package/src/plugins/vast-ads/VastAds.ts +2 -2
  451. package/src/plugins/vast-ads/roll.ts +1 -1
  452. package/src/plugins/vast-ads/rollmanager.ts +1 -1
  453. package/src/plugins/volume-fade/VolumeFade.ts +4 -1
  454. package/src/types.ts +0 -2
  455. package/src/typings/vitest.d.ts +11 -0
  456. package/src/utils/types.ts +6 -0
  457. package/temp/player.api.json +12689 -1324
  458. package/tsconfig.tsbuildinfo +1 -1
  459. package/vitest.config.ts +9 -0
  460. package/src/plugins/types.ts +0 -7
@@ -0,0 +1,1977 @@
1
+ /**
2
+ * Video player for the Gcore streaming platform
3
+ *
4
+ * @remarks
5
+ * This package provides a video player for the Gcore streaming platform.
6
+ * It is built on top of the Clappr library and provides a framework for building custom integrations.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+
11
+ import { $ } from '@clappr/core';
12
+ import { AudioTrackLoadedData } from 'hls.js';
13
+ import { AudioTrackSwitchedData } from 'hls.js';
14
+ import { Container } from '@clappr/core';
15
+ import { ContainerPlugin } from '@clappr/core';
16
+ import { Core } from '@clappr/core';
17
+ import { CorePlugin } from '@clappr/core';
18
+ import { Events } from 'hls.js';
19
+ import { Logger } from '@gcorevideo/utils';
20
+ import { LogTracer } from '@gcorevideo/utils';
21
+ import { reportError as reportError_2 } from '@gcorevideo/utils';
22
+ import { SentryTracer } from '@gcorevideo/utils';
23
+ import { setTracer } from '@gcorevideo/utils';
24
+ import { trace } from '@gcorevideo/utils';
25
+ import { UIContainerPlugin } from '@clappr/core';
26
+ import { UICorePlugin } from '@clappr/core';
27
+ import { UIObject } from '@clappr/core';
28
+
29
+ /**
30
+ * @beta
31
+ */
32
+ export declare class AudioSelector extends UICorePlugin {
33
+ private selectedTrackId;
34
+ private currentTrack;
35
+ private tracks;
36
+ get name(): string;
37
+ get supportedVersion(): {
38
+ min: string;
39
+ };
40
+ static get version(): string;
41
+ get template(): any;
42
+ get attributes(): {
43
+ class: string;
44
+ 'data-track-selector': string;
45
+ };
46
+ get events(): {
47
+ 'click [data-track-selector-select]': string;
48
+ 'click [data-track-selector-button]': string;
49
+ };
50
+ bindEvents(): void;
51
+ unBindEvents(): void;
52
+ private bindPlaybackEvents;
53
+ private setupAudioTrackListeners;
54
+ private onStop;
55
+ reload(): void;
56
+ private shouldRender;
57
+ render(): this;
58
+ private fillTracks;
59
+ private findTrackBy;
60
+ private onTrackSelect;
61
+ private setIndexTrack;
62
+ onShowLevelSelectMenu(): void;
63
+ hideSelectTrackMenu(): void;
64
+ toggleContextMenu(): void;
65
+ private buttonElement;
66
+ private buttonElementText;
67
+ private trackElement;
68
+ private getTitle;
69
+ startTrackSwitch(): void;
70
+ private updateText;
71
+ updateCurrentTrack(e: Events.AUDIO_TRACK_SWITCHED, info: AudioTrackSwitchedData | AudioTrackLoadedData): void;
72
+ private updateCurrentTrackW3C;
73
+ private setCurrentTrack;
74
+ highlightCurrentTrack(): void;
75
+ }
76
+
77
+ /**
78
+ * @beta
79
+ */
80
+ export declare class BigMuteButton extends UICorePlugin {
81
+ private isBigMuteButtonHidden;
82
+ private _adIsPlaying;
83
+ private $bigMuteBtnContainer;
84
+ private $bigMuteButton;
85
+ get name(): string;
86
+ get supportedVersion(): {
87
+ min: string;
88
+ };
89
+ get template(): any;
90
+ get events(): {
91
+ 'click .big-mute-icon': string;
92
+ 'click .big-mute-icon-wrapper': string;
93
+ };
94
+ bindEvents(): void;
95
+ private unBindEvents;
96
+ private onCoreReady;
97
+ private onContainerVolume;
98
+ private onContainerStart;
99
+ private onPlaybackEnded;
100
+ private mediaControlRendered;
101
+ private onStartAd;
102
+ private onFinishAd;
103
+ private shouldRender;
104
+ render(): this;
105
+ private hideBigMuteBtn;
106
+ private showBigMuteBtn;
107
+ private destroyBigMuteBtn;
108
+ private handleBigMuteBtnClick;
109
+ }
110
+
111
+ declare type BitrateTrackRecord = {
112
+ start: number;
113
+ end?: number;
114
+ time?: number;
115
+ bitrate: number;
116
+ };
117
+
118
+ /**
119
+ * @beta
120
+ */
121
+ export declare class BottomGear extends UICorePlugin {
122
+ private isHd;
123
+ get name(): string;
124
+ get supportedVersion(): {
125
+ min: string;
126
+ };
127
+ static get version(): string;
128
+ get template(): any;
129
+ get attributes(): {
130
+ class: string;
131
+ 'data-track-selector': string;
132
+ };
133
+ get events(): {
134
+ 'click .button-gear': string;
135
+ };
136
+ get container(): any;
137
+ bindEvents(): void;
138
+ unBindEvents(): void;
139
+ private onActiveContainerChanged;
140
+ private bindContainerEvents;
141
+ reload(): void;
142
+ private highDefinitionUpdate;
143
+ render(): this;
144
+ refresh(): void;
145
+ toggleGearMenu(): void;
146
+ hide(): void;
147
+ }
148
+
149
+ /**
150
+ * @beta
151
+ */
152
+ export declare class ClapprNerdStats extends UICorePlugin {
153
+ private container;
154
+ private customMetrics;
155
+ private metrics;
156
+ private showing;
157
+ private shortcut;
158
+ private iconPosition;
159
+ get name(): string;
160
+ get supportedVersion(): {
161
+ min: string;
162
+ };
163
+ get template(): any;
164
+ get attributes(): {
165
+ 'data-clappr-nerd-stats': string;
166
+ class: string;
167
+ };
168
+ get events(): {
169
+ 'click [data-show-stats-button]': string;
170
+ 'click [data-close-button]': string;
171
+ 'click [data-refresh-button]': string;
172
+ };
173
+ get statsBoxElem(): string;
174
+ get statsBoxWidthThreshold(): number;
175
+ get playerWidth(): any;
176
+ get playerHeight(): any;
177
+ constructor(core: Core);
178
+ bindEvents(): void;
179
+ private init;
180
+ private showOrHide;
181
+ private show;
182
+ private hide;
183
+ private onPlayerResize;
184
+ private addGeneralMetrics;
185
+ private addCustomMetrics;
186
+ private updateMetrics;
187
+ private setStatsBoxSize;
188
+ render(): this;
189
+ private addToBottomGear;
190
+ private clearCustomMetrics;
191
+ private refreshSpeedTest;
192
+ }
193
+
194
+ /**
195
+ * @beta
196
+ */
197
+ export declare class ClapprStats extends ContainerPlugin {
198
+ private bwMeasureCount;
199
+ private intervalId;
200
+ private lastDecodedFramesCount;
201
+ private metrics;
202
+ private completion;
203
+ private _onReport;
204
+ private runBandwidthTestEvery;
205
+ private runEach;
206
+ private timers;
207
+ private updateFn;
208
+ private urisToMeasureBandwidth;
209
+ private uriToMeasureLatency;
210
+ get name(): string;
211
+ get supportedVersion(): {
212
+ min: string;
213
+ };
214
+ get _playbackName(): string;
215
+ get _playbackType(): any;
216
+ private _now;
217
+ private _inc;
218
+ private start;
219
+ private _stop;
220
+ setUpdateMetrics(updateMetricsFn: MetricsUpdateFn): void;
221
+ _defaultReport(metrics: Metrics): void;
222
+ constructor(container: Container);
223
+ bindEvents(): void;
224
+ destroy(): void;
225
+ exportMetrics(): Metrics;
226
+ onBitrate(newBitrate: QualityLevel): void;
227
+ stopReporting(): void;
228
+ startTimers(): void;
229
+ onFirstPlaying(): void;
230
+ playAfterPause(): void;
231
+ private onPlay;
232
+ private onPause;
233
+ private onSeek;
234
+ private onTimeUpdate;
235
+ private onContainerUpdateWhilePlaying;
236
+ private onBuffering;
237
+ private onBufferfull;
238
+ private onProgress;
239
+ private _newMetrics;
240
+ private _onCompletion;
241
+ _buildReport(): void;
242
+ private _fetchFPS;
243
+ private _calculateBitrates;
244
+ private _calculatePercentages;
245
+ private _html5FetchFPS;
246
+ private _measureLatency;
247
+ private _measureBandwidth;
248
+ }
249
+
250
+ export declare class ClickToPause extends ContainerPlugin {
251
+ private pointerEnabled;
252
+ private timer;
253
+ get name(): string;
254
+ get supportedVersion(): {
255
+ min: string;
256
+ };
257
+ get config(): any;
258
+ bindEvents(): void;
259
+ private click;
260
+ private settingsUpdate;
261
+ private togglePlay;
262
+ private clearTimer;
263
+ }
264
+
265
+ export declare class ClipsPlugin extends UICorePlugin {
266
+ private clips;
267
+ private duration;
268
+ private durationGetting;
269
+ private _oldContainer;
270
+ private svgMask;
271
+ get name(): string;
272
+ get attributes(): {
273
+ class: string;
274
+ };
275
+ bindEvents(): void;
276
+ private _onCoreReady;
277
+ unbindEvents(): void;
278
+ private _onMediaControlContainerChanged;
279
+ private playerResize;
280
+ private _bindContainerEvents;
281
+ private onTimeUpdate;
282
+ private parseClips;
283
+ getText(time: number): string;
284
+ makeSvg(duration: number): void;
285
+ private setSVGMask;
286
+ private setClipText;
287
+ }
288
+
289
+ /**
290
+ * Dimensions of the player container DOM element.
291
+ * @beta
292
+ */
293
+ export declare type ContainerSize = {
294
+ width: number;
295
+ height: number;
296
+ };
297
+
298
+ export declare class ContextMenu extends UICorePlugin {
299
+ private _label;
300
+ private _url;
301
+ private container;
302
+ private menuOptions;
303
+ get name(): string;
304
+ get supportedVersion(): {
305
+ min: string;
306
+ };
307
+ get attributes(): {
308
+ class: string;
309
+ };
310
+ get mediaControl(): any;
311
+ get template(): any;
312
+ get label(): string;
313
+ get url(): string;
314
+ get exposeVersion(): {
315
+ label: string;
316
+ name: string;
317
+ };
318
+ get events(): {
319
+ 'click [data-version]': string;
320
+ };
321
+ constructor(core: Core);
322
+ bindEvents(): void;
323
+ destroy(): UIObject;
324
+ private containerChanged;
325
+ private toggleContextMenu;
326
+ private show;
327
+ private hide;
328
+ private onOpenMainPage;
329
+ render(): this;
330
+ }
331
+
332
+ /**
333
+ * A plain JS object that must conform to the DASH.js settings schema.
334
+ * @beta
335
+ * {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html | DASH.js settings}
336
+ */
337
+ export declare type DashSettings = Record<string, unknown>;
338
+
339
+ export declare class DisableControls extends UICorePlugin {
340
+ get name(): string;
341
+ get container(): any;
342
+ get supportedVersion(): {
343
+ min: string;
344
+ };
345
+ bindEvents(): void;
346
+ unbindEvents(): void;
347
+ private setDisableStyles;
348
+ private onCoreReady;
349
+ private enableControls;
350
+ private disableAllControls;
351
+ }
352
+
353
+ export declare class DvrControls extends UICorePlugin {
354
+ get template(): any;
355
+ get name(): string;
356
+ get supportedVersion(): {
357
+ min: string;
358
+ };
359
+ get events(): {
360
+ 'click .live-button': string;
361
+ };
362
+ get attributes(): {
363
+ class: string;
364
+ 'data-dvr-controls': string;
365
+ };
366
+ constructor(core: Core);
367
+ bindEvents(): void;
368
+ private bindCoreEvents;
369
+ private bindContainerEvents;
370
+ private containerChanged;
371
+ private dvrChanged;
372
+ click(): void;
373
+ settingsUpdate(): void;
374
+ shouldRender(): boolean;
375
+ render(): this;
376
+ }
377
+
378
+ /**
379
+ * Levels of severity of errors. Non-fatal errors usually can be ignored.
380
+ * @beta
381
+ */
382
+ export declare type ErrorLevel = 'FATAL' | 'WARN' | 'INFO';
383
+
384
+ export declare class ErrorScreen extends UICorePlugin {
385
+ private _retry;
386
+ private err;
387
+ private hideValue;
388
+ private timeout;
389
+ private reloadButton;
390
+ get name(): string;
391
+ get supportedVersion(): {
392
+ min: string;
393
+ };
394
+ get template(): any;
395
+ get container(): any;
396
+ get attributes(): {
397
+ class: string;
398
+ 'data-error-screen': string;
399
+ };
400
+ bindEvents(): void;
401
+ private onCoreReady;
402
+ private onPlay;
403
+ private destroyError;
404
+ unBindEvents(): void;
405
+ private bindReload;
406
+ private reload;
407
+ private unbindReload;
408
+ private onContainerChanged;
409
+ private onStartAd;
410
+ private onFinishAd;
411
+ private onError;
412
+ private drying;
413
+ show(err?: PresentationalError): void;
414
+ hide(): void;
415
+ render(): this;
416
+ }
417
+
418
+ export declare class Favicon extends CorePlugin {
419
+ private _container;
420
+ private oldIcon;
421
+ private playIcon;
422
+ private pauseIcon;
423
+ private stopIcon;
424
+ get name(): string;
425
+ get supportedVersion(): {
426
+ min: string;
427
+ };
428
+ constructor(core: Core);
429
+ configure(): void;
430
+ bindEvents(): void;
431
+ private containerChanged;
432
+ disable(): void;
433
+ destroy(): void;
434
+ private createIcon;
435
+ private setPlayIcon;
436
+ private setPauseIcon;
437
+ private resetIcon;
438
+ private changeIcon;
439
+ }
440
+
441
+ export declare class GoogleAnalytics extends ContainerPlugin {
442
+ private account;
443
+ private trackerName;
444
+ private domainName;
445
+ private currentHDState;
446
+ get name(): string;
447
+ get supportedVersion(): {
448
+ min: string;
449
+ };
450
+ constructor(container: Container);
451
+ embedScript(): void;
452
+ addEventListeners(): void;
453
+ onReady(): void;
454
+ onPlay(): void;
455
+ onStop(): void;
456
+ onEnded(): void;
457
+ onBuffering(): void;
458
+ onBufferFull(): void;
459
+ onError(): void;
460
+ onHD(isHD: boolean): void;
461
+ private onPlaybackChanged;
462
+ onDVR(dvrInUse: boolean): void;
463
+ onPause(): void;
464
+ onSeek(): void;
465
+ onVolumeChanged(): void;
466
+ onFullscreen(): void;
467
+ push(array: string[]): void;
468
+ }
469
+
470
+ declare type KeyboardEventHandler = (e: KeyboardEvent) => boolean | undefined;
471
+
472
+ /**
473
+ * @internal
474
+ */
475
+ export declare class Kibo {
476
+ private element;
477
+ private lastKeyCode;
478
+ private lastModifiers;
479
+ private keysDown;
480
+ private keysUp;
481
+ private downHandler;
482
+ private upHandler;
483
+ constructor(element?: Document | Element);
484
+ private handler;
485
+ private registerKeys;
486
+ private unregisterKeys;
487
+ off(keys: string | string[]): Kibo;
488
+ delegate(upOrDown: UpDown, keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
489
+ down(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
490
+ up(keys: string | string[], func?: KeyboardEventHandler | null): Kibo;
491
+ lastKey(modifier?: string): string | boolean;
492
+ lastModifiersAndKey(): string;
493
+ }
494
+
495
+ /**
496
+ * An ISO 639-1 language code.
497
+ * @example `pt`
498
+ * @beta
499
+ */
500
+ export declare type LangTag = string;
501
+
502
+ /**
503
+ * Allows to control the quality level of the playback.
504
+ * @beta
505
+ *
506
+ * @remarks
507
+ * The plugin is rendered as a button in the gear menu.
508
+ * When clicked, it shows a list of quality levels to choose from.
509
+ *
510
+ * Configuration options:
511
+ *
512
+ * - `labels`: The labels to show in the level selector. [vertical resolution]: string
513
+ * - `restrictResolution`: The maximum resolution to allow in the level selector.
514
+ *
515
+ * @example
516
+ * ```ts
517
+ * {
518
+ * levelSelector: {
519
+ * restrictResolution: 360,
520
+ * labels: { 360: '360p', 720: '720p' },
521
+ * },
522
+ * }
523
+ * ```
524
+ */
525
+ export declare class LevelSelector extends UICorePlugin {
526
+ private levels;
527
+ private levelLabels;
528
+ private removeAuto;
529
+ private isHd;
530
+ private isOpen;
531
+ private buttonTemplate;
532
+ private listTemplate;
533
+ get name(): string;
534
+ get supportedVersion(): {
535
+ min: string;
536
+ };
537
+ static get version(): string;
538
+ get attributes(): {
539
+ class: string;
540
+ 'data-level-selector': string;
541
+ };
542
+ private currentText;
543
+ private selectedLevelId;
544
+ get events(): {
545
+ 'click .gear-sub-menu_btn': string;
546
+ 'click .gear-option': string;
547
+ 'click .go-back': string;
548
+ };
549
+ bindEvents(): void;
550
+ private bindPlaybackEvents;
551
+ private onStop;
552
+ private shouldRender;
553
+ render(): this;
554
+ private renderButton;
555
+ private renderDropdown;
556
+ private get maxLevel();
557
+ private fillLevels;
558
+ private makeLevelsLabels;
559
+ private onLevelSelect;
560
+ private goBack;
561
+ private setLevel;
562
+ private onShowLevelSelectMenu;
563
+ private allLevelElements;
564
+ private levelElement;
565
+ private onLevelSwitchStart;
566
+ private onLevelSwitchEnd;
567
+ private updateText;
568
+ private getLevelLabel;
569
+ private updateCurrentLevel;
570
+ private highlightCurrentLevel;
571
+ private deferRender;
572
+ }
573
+
574
+ export { Logger }
575
+
576
+ export declare class Logo extends UIContainerPlugin {
577
+ private hasStartedPlaying;
578
+ private $logoContainer;
579
+ get name(): string;
580
+ get supportedVersion(): {
581
+ min: string;
582
+ };
583
+ get template(): any;
584
+ get attributes(): {
585
+ class: string;
586
+ 'data-logo': string;
587
+ };
588
+ private get shouldRender();
589
+ bindEvents(): void;
590
+ stopListening(): this;
591
+ private onPlay;
592
+ private onStop;
593
+ private update;
594
+ constructor(container: Container);
595
+ render(): this;
596
+ private setLogoImgAttrs;
597
+ private setLogoWidth;
598
+ private setPosition;
599
+ private setStyles;
600
+ private setStyle;
601
+ }
602
+
603
+ export { LogTracer }
604
+
605
+ /**
606
+ * The MediaControl is responsible for displaying the Player controls.
607
+ * @beta
608
+ * @remarks
609
+ * This plugin provides a foundation for developing a media controls UI via additional plugins.
610
+ * The methods exposed are to be used by the other plugins that extend the media control UI.
611
+ */
612
+ export declare class MediaControl extends UICorePlugin {
613
+ private advertisementPlaying;
614
+ private buttonsColor;
615
+ private currentDurationValue;
616
+ private currentPositionValue;
617
+ private currentSeekBarPercentage;
618
+ private disabledClickableList;
619
+ private displayedDuration;
620
+ private displayedPosition;
621
+ private displayedSeekBarPercentage;
622
+ private draggingSeekBar;
623
+ private draggingVolumeBar;
624
+ private fullScreenOnVideoTagSupported;
625
+ private hideId;
626
+ private hideVolumeId;
627
+ private intendedVolume;
628
+ private isHD;
629
+ private keepVisible;
630
+ private kibo;
631
+ private lastMouseX;
632
+ private lastMouseY;
633
+ private persistConfig;
634
+ private rendered;
635
+ private settings;
636
+ private svgMask;
637
+ private userDisabled;
638
+ private userKeepVisible;
639
+ private verticalVolume;
640
+ private $audioTracksSelector;
641
+ private $bottomGear;
642
+ private $clipText;
643
+ private $clipTextContainer;
644
+ private $duration;
645
+ private $fullscreenToggle;
646
+ private $multiCameraSelector;
647
+ private $pip;
648
+ private $playPauseToggle;
649
+ private $playStopToggle;
650
+ private $playbackRate;
651
+ private $position;
652
+ private $seekBarContainer;
653
+ private $seekBarHover;
654
+ private $seekBarLoaded;
655
+ private $seekBarPosition;
656
+ private $seekBarScrubber;
657
+ private $subtitlesSelector;
658
+ private $volumeBarContainer;
659
+ private $volumeBarBackground;
660
+ private $volumeBarFill;
661
+ private $volumeBarScrubber;
662
+ private $volumeContainer;
663
+ private $volumeIcon;
664
+ private readonly template;
665
+ get name(): string;
666
+ get supportedVersion(): {
667
+ min: string;
668
+ };
669
+ get disabled(): any;
670
+ get container(): any;
671
+ get playback(): any;
672
+ get attributes(): {
673
+ class: string;
674
+ 'data-media-control-skin-1': string;
675
+ };
676
+ get events(): {
677
+ 'click [data-play]': string;
678
+ 'click [data-pause]': string;
679
+ 'click [data-playpause]': string;
680
+ 'click [data-stop]': string;
681
+ 'click [data-playstop]': string;
682
+ 'click [data-fullscreen]': string;
683
+ 'click .bar-container[data-seekbar]': string;
684
+ 'click .bar-container[data-volume]': string;
685
+ 'click .drawer-icon[data-volume]': string;
686
+ 'mouseenter .drawer-container[data-volume]': string;
687
+ 'mouseleave .drawer-container[data-volume]': string;
688
+ 'mousedown .bar-container[data-volume]': string;
689
+ 'touchstart .bar-container[data-volume]': string;
690
+ 'mousemove .bar-container[data-volume]': string;
691
+ 'touchmove .bar-container[data-volume]': string;
692
+ 'mousedown .bar-scrubber[data-seekbar]': string;
693
+ 'mousedown .bar-container[data-seekbar]': string;
694
+ 'touchstart .bar-scrubber[data-seekbar]': string;
695
+ 'touchstart .bar-container[data-seekbar]': string;
696
+ 'mousemove .bar-container[data-seekbar]': string;
697
+ 'touchmove .bar-container[data-seekbar]': string;
698
+ 'mouseleave .bar-container[data-seekbar]': string;
699
+ 'touchend .bar-container[data-seekbar]': string;
700
+ 'mouseenter .media-control-layer[data-controls]': string;
701
+ 'mouseleave .media-control-layer[data-controls]': string;
702
+ };
703
+ /**
704
+ * Current volume
705
+ */
706
+ get volume(): any;
707
+ /**
708
+ * Muted state
709
+ */
710
+ get muted(): boolean;
711
+ constructor(core: Core);
712
+ getExternalInterface(): {
713
+ setVolume: (value: number, isInitialVolume?: boolean) => void;
714
+ getVolume: () => any;
715
+ };
716
+ bindEvents(): void;
717
+ bindContainerEvents(): void;
718
+ disable(): void;
719
+ enable(): void;
720
+ /**
721
+ * Start the playback
722
+ */
723
+ play(): void;
724
+ /**
725
+ * Pause the playback
726
+ */
727
+ pause(): void;
728
+ /**
729
+ * Stop the playback
730
+ */
731
+ stop(): void;
732
+ /**
733
+ * Set the initial volume, which is preserved when playback is interrupted by an advertisement
734
+ */
735
+ setInitialVolume(): void;
736
+ private onVolumeChanged;
737
+ private onLoadedMetadataOnVideoTag;
738
+ private updateVolumeUI;
739
+ private changeTogglePlay;
740
+ private mousemoveOnSeekBar;
741
+ private mouseleaveOnSeekBar;
742
+ private onVolumeClick;
743
+ private mousemoveOnVolumeBar;
744
+ private playerResize;
745
+ private togglePlayPause;
746
+ private togglePlayStop;
747
+ private startSeekDrag;
748
+ private startVolumeDrag;
749
+ private stopDrag;
750
+ private updateDrag;
751
+ private getVolumeFromUIEvent;
752
+ private toggleMute;
753
+ /**
754
+ * Set the volume
755
+ * @param value - The volume value
756
+ * @param isInitialVolume - save as the initial volume
757
+ * @remarks
758
+ * Initial volume can be restored later
759
+ */
760
+ setVolume(value: number, isInitialVolume?: boolean): void;
761
+ private toggleFullscreen;
762
+ private onActiveContainerChanged;
763
+ private showVolumeBar;
764
+ private hideVolumeBar;
765
+ private ended;
766
+ private updateProgressBar;
767
+ private onTimeUpdate;
768
+ private renderSeekBar;
769
+ private drawDurationAndPosition;
770
+ private seek;
771
+ private setKeepVisible;
772
+ private resetKeepVisible;
773
+ private setUserKeepVisible;
774
+ private resetUserKeepVisible;
775
+ private isVisible;
776
+ private show;
777
+ private hide;
778
+ private updateCursorStyle;
779
+ private settingsUpdate;
780
+ private getSettings;
781
+ private highDefinitionUpdate;
782
+ private createCachedElements;
783
+ /**
784
+ * Get a media control element DOM node
785
+ * @param name - The name of the media control element
786
+ * @returns The DOM node to render the media control element
787
+ */
788
+ getElement(name: MediaControlElement): ZeptoResult | null;
789
+ private resetIndicators;
790
+ private initializeIcons;
791
+ private setSeekPercentage;
792
+ private seekRelative;
793
+ private bindKeyAndShow;
794
+ private bindKeyEvents;
795
+ private unbindKeyEvents;
796
+ private parseColors;
797
+ private applyButtonStyle;
798
+ destroy(): UIObject;
799
+ private configure;
800
+ render(): this;
801
+ private handleFullScreenOnBtn;
802
+ private onStartAd;
803
+ private onFinishAd;
804
+ private hideControllAds;
805
+ setMuted(value: boolean): void;
806
+ private static getPageX;
807
+ private static getPageY;
808
+ /**
809
+ * Enable the control button
810
+ */
811
+ enableControlButton(): void;
812
+ /**
813
+ * Disable the control button
814
+ */
815
+ disabledControlButton(): void;
816
+ private isSeekEnabledForHtml5Playback;
817
+ }
818
+
819
+ /**
820
+ * @beta
821
+ */
822
+ export declare type MediaControlElement = 'clipText' | 'pip' | 'seekBarContainer';
823
+
824
+ declare type MediaSourceInfo = {
825
+ live: boolean;
826
+ source: string;
827
+ id: number;
828
+ dvr: boolean;
829
+ projection: string | null;
830
+ };
831
+
832
+ /**
833
+ * Media delivery protocol
834
+ * @beta
835
+ */
836
+ export declare type MediaTransport = 'dash' | 'hls';
837
+
838
+ declare type Metrics = {
839
+ counters: {
840
+ play: number;
841
+ pause: number;
842
+ error: number;
843
+ buffering: number;
844
+ decodedFrames: number;
845
+ droppedFrames: number;
846
+ fps: number;
847
+ changeLevel: number;
848
+ seek: number;
849
+ fullscreen: number;
850
+ dvrUsage: number;
851
+ };
852
+ timers: {
853
+ startup: number;
854
+ watch: number;
855
+ pause: number;
856
+ buffering: number;
857
+ session: number;
858
+ latency: number;
859
+ };
860
+ extra: {
861
+ playbackName: string;
862
+ playbackType: string;
863
+ bitratesHistory: BitrateTrackRecord[];
864
+ bitrateWeightedMean: number;
865
+ bitrateMostUsed: number;
866
+ buffersize: number;
867
+ watchHistory: Array<[number, number]>;
868
+ watchedPercentage: number;
869
+ bufferingPercentage: number;
870
+ bandwidth: number;
871
+ duration: number;
872
+ currentTime: number;
873
+ };
874
+ custom: Record<string, unknown>;
875
+ };
876
+
877
+ declare type MetricsUpdateFn = (metrics: Metrics) => void;
878
+
879
+ export declare class MultiCamera extends UICorePlugin {
880
+ private currentCamera;
881
+ private currentTime;
882
+ private playing;
883
+ private multicamera;
884
+ private noActiveStreams;
885
+ get name(): string;
886
+ get supportedVersion(): {
887
+ min: string;
888
+ };
889
+ static get version(): string;
890
+ get template(): any;
891
+ get attributes(): {
892
+ class: string;
893
+ 'data-multicamera': string;
894
+ };
895
+ get events(): {
896
+ 'click [data-multicamera-selector-select]': string;
897
+ 'click [data-multicamera-button]': string;
898
+ };
899
+ constructor(core: Core);
900
+ bindEvents(): void;
901
+ unBindEvents(): void;
902
+ private onPlay;
903
+ private bindPlaybackEvents;
904
+ private reload;
905
+ private shouldRender;
906
+ render(): this;
907
+ private onCameraSelect;
908
+ activeById(id: number, active: boolean): void;
909
+ private setLiveStatus;
910
+ private behaviorLive;
911
+ private behaviorOne;
912
+ private behaviorAll;
913
+ private findAndInitNextStream;
914
+ private showError;
915
+ private hideError;
916
+ private changeById;
917
+ getCamerasList(): MediaSourceInfo[];
918
+ getCurrentCamera(): MediaSourceInfo | null;
919
+ private findElementById;
920
+ private findIndexById;
921
+ private onShowLevelSelectMenu;
922
+ private hideSelectLevelMenu;
923
+ private toggleContextMenu;
924
+ private levelElement;
925
+ private highlightCurrentLevel;
926
+ }
927
+
928
+ export declare class PictureInPicture extends UICorePlugin {
929
+ get name(): string;
930
+ get supportedVersion(): {
931
+ min: string;
932
+ };
933
+ static get version(): string;
934
+ get events(): {
935
+ 'click button': string;
936
+ };
937
+ get videoElement(): any;
938
+ bindEvents(): void;
939
+ private isPiPSupported;
940
+ render(): this;
941
+ togglePictureInPicture(): void;
942
+ requestPictureInPicture(): void;
943
+ exitPictureInPicture(): void;
944
+ }
945
+
946
+ /**
947
+ * An error occurred during the playback.
948
+ * @beta
949
+ */
950
+ export declare interface PlaybackError {
951
+ /**
952
+ * Error code.
953
+ */
954
+ code: PlaybackErrorCode;
955
+ /**
956
+ * Detailed description of the error.
957
+ */
958
+ description: string;
959
+ /**
960
+ * Level of severity of the error.
961
+ */
962
+ level: ErrorLevel;
963
+ /**
964
+ * Error message. Non-fatal usually can be ignored.
965
+ */
966
+ message: string;
967
+ /**
968
+ * Exact component that originated the error.
969
+ * @example
970
+ * - 'core'
971
+ * - 'dash'
972
+ * - 'media_control'
973
+ */
974
+ origin: string;
975
+ /**
976
+ * Component subsystem of the error origin
977
+ */
978
+ scope: PlayerComponentType;
979
+ }
980
+
981
+ /**
982
+ * Codes of errors occurring within the playback component.
983
+ * @beta
984
+ */
985
+ export declare enum PlaybackErrorCode {
986
+ /**
987
+ * An unknown or uncategorised error.
988
+ */
989
+ Generic = 0,
990
+ /**
991
+ * The media source is not available. Typically a network error.
992
+ */
993
+ MediaSourceUnavailable = 1,
994
+ /**
995
+ * The media source is not accessible due to some protection policy.
996
+ */
997
+ MediaSourceAccessDenied = 3
998
+ }
999
+
1000
+ /**
1001
+ * Module to perform the playback.
1002
+ * @beta
1003
+ */
1004
+ export declare type PlaybackModule = 'dash' | 'hls' | 'html5_video';
1005
+
1006
+ export declare class PlaybackRate extends UICorePlugin {
1007
+ private currentPlayback;
1008
+ private playbackRates;
1009
+ private prevSelectedRate;
1010
+ private selectedRate;
1011
+ get name(): string;
1012
+ get supportedVersion(): {
1013
+ min: string;
1014
+ };
1015
+ get template(): any;
1016
+ get attributes(): {
1017
+ class: string;
1018
+ 'data-playback-rate-select': string;
1019
+ };
1020
+ get events(): {
1021
+ 'click .gear-sub-menu_btn': string;
1022
+ 'click .gear-option': string;
1023
+ 'click .go-back': string;
1024
+ };
1025
+ bindEvents(): void;
1026
+ unBindEvents(): void;
1027
+ private allRateElements;
1028
+ private rateElement;
1029
+ private onDashRateChange;
1030
+ private updateLiveStatus;
1031
+ reload(): void;
1032
+ private shouldRender;
1033
+ render(): this;
1034
+ onStartAd(): void;
1035
+ onFinishAd(): void;
1036
+ onPlay(): void;
1037
+ onStop(): void;
1038
+ onRateSelect(event: MouseEvent): boolean;
1039
+ onShowMenu(): void;
1040
+ goBack(): void;
1041
+ updatePlaybackRate(rate: string): void;
1042
+ setSelectedRate(rate: string): void;
1043
+ getTitle(): string;
1044
+ highlightCurrentRate(): void;
1045
+ }
1046
+
1047
+ /**
1048
+ * Type of a stream playback
1049
+ * @beta
1050
+ */
1051
+ export declare type PlaybackType = 'live' | 'vod';
1052
+
1053
+ /**
1054
+ * The main component to use in the application code.
1055
+ * @beta
1056
+ * @remarks
1057
+ * The Player object provides very basic API to control playback.
1058
+ * To build a sophisticated UI, use the plugins framework to tap into the Clappr core.
1059
+ * {@link https://github.com/clappr/clappr/wiki/Architecture}
1060
+ */
1061
+ export declare class Player {
1062
+ private config;
1063
+ private emitter;
1064
+ private player;
1065
+ private ready;
1066
+ private rootNode;
1067
+ private tuneInTimerId;
1068
+ private tunedIn;
1069
+ constructor(config: PlayerConfig);
1070
+ /**
1071
+ * Adds a listener to a player event
1072
+ * @param event - event type, see {@link PlayerEvent}
1073
+ * @param handler - a callback function to handle the event
1074
+ */
1075
+ on<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
1076
+ /**
1077
+ * Removes a previously added event listener
1078
+ * @param event - See {@link PlayerEvent}
1079
+ * @param handler - a callback attached earlier to that event type
1080
+ */
1081
+ off<E extends PlayerEvent>(event: E, handler: PlayerEventHandler<E>): void;
1082
+ /**
1083
+ * Configures the player.
1084
+ *
1085
+ * @param config - complete or partial configuration
1086
+ * @remarks
1087
+ * Can be called multiple times.
1088
+ * Each consequent call extends the previous configuration with only the new keys overridden.
1089
+ *
1090
+ * After a reconfiguration, if something significant has changed, it might make sense reinitialize the player (i.e, a `.destroy()` followed by an `.init()` call).
1091
+ */
1092
+ configure(config: Partial<PlayerConfig>): void;
1093
+ /**
1094
+ * Initializes the player at the given container element.
1095
+ * @param playerElement - DOM element to host the player
1096
+ * @remarks
1097
+ * The player will be initialized and attached to the given element.
1098
+ *
1099
+ * All the core plugins will be initialized at this point.
1100
+ *
1101
+ * If no sources were configured, it will trigger an error.
1102
+ *
1103
+ * The player container will be initialized and then all the registered UI plugins.
1104
+ *
1105
+ * If the `autoPlay` option is set, then it will trigger playback immediately.
1106
+ *
1107
+ * It is an error to call this method twice. If you need to attache player to another DOM element,
1108
+ * first call {@link Player.destroy} and then {@link Player.attachTo}.
1109
+ *
1110
+ * @example
1111
+ * ```ts
1112
+ * const player = new Player({
1113
+ * sources: [{ source: 'https://example.com/a.mpd', mimeType: 'application/dash+xml' }],
1114
+ * })
1115
+ * document.addEventListener('DOMContentLoaded', () => {
1116
+ * player.attachTo(document.getElementById('video-container'))
1117
+ * })
1118
+ * ```
1119
+ */
1120
+ attachTo(playerElement: HTMLElement): void;
1121
+ /**
1122
+ * Destroys the player, releasing all resources and unmounting its UI from the DOM.
1123
+ */
1124
+ destroy(): void;
1125
+ /**
1126
+ * Current playback (time since the beginning of the stream), if appropriate.
1127
+ *
1128
+ * @returns Time in seconds
1129
+ * @remarks
1130
+ * For live streams, it returns the current time within the current segment.
1131
+ */
1132
+ getCurrentTime(): number;
1133
+ /**
1134
+ * Duration of the current media in seconds, if appropriate.
1135
+ *
1136
+ * @returns Time in seconds
1137
+ * @remarks
1138
+ * For live streams, it returns the duration of the current segment.
1139
+ */
1140
+ getDuration(): number;
1141
+ /**
1142
+ * Indicates whether DVR is enabled.
1143
+ */
1144
+ isDvrEnabled(): boolean;
1145
+ /**
1146
+ * Indicates whether DVR is in use.
1147
+ * @remarks
1148
+ * DVR mode, if it is enabled, is triggered we a user seeks behind the live edge.
1149
+ */
1150
+ isDvrInUse(): boolean;
1151
+ /**
1152
+ * Indicates muted state of the video.
1153
+ * @remarks
1154
+ * Note that muted state is independent from the volume level.
1155
+ * See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted}
1156
+ */
1157
+ isMuted(): boolean;
1158
+ /**
1159
+ * Indicates the playing state.
1160
+ */
1161
+ isPlaying(): boolean;
1162
+ /**
1163
+ * Mutes the sound of the video.
1164
+ */
1165
+ mute(): void;
1166
+ /**
1167
+ * Unmutes the video sound.
1168
+ */
1169
+ unmute(): void;
1170
+ /**
1171
+ * Pauses playback.
1172
+ */
1173
+ pause(): void;
1174
+ /**
1175
+ * Starts playback.
1176
+ */
1177
+ play(): void;
1178
+ /**
1179
+ * Resizes the player container element and everything within it.
1180
+ * @param newSize - new size of the player
1181
+ * @remarks
1182
+ * Use this method when the player itself does not detect properly the change in size of its container element.
1183
+ * It can be a case for orientation change on some mobile devices.
1184
+ */
1185
+ resize(newSize: ContainerSize): void;
1186
+ /**
1187
+ * Seeks to the given time.
1188
+ * @param time - time to seek to in seconds (since the beginning of the stream)
1189
+ */
1190
+ seek(time: number): void;
1191
+ /**
1192
+ * Gets the current volume of the media content being played.
1193
+ * @returns a number between 0 and 1
1194
+ */
1195
+ getVolume(): number;
1196
+ /**
1197
+ * Sets the current volume of the media content being played.
1198
+ * @param volume - a number between 0 and 1
1199
+ */
1200
+ setVolume(volume: number): void;
1201
+ /**
1202
+ * Stops playback.
1203
+ */
1204
+ stop(): void;
1205
+ /**
1206
+ * Registers a plugin.
1207
+ * @param plugin - a plugin class
1208
+ * @remarks
1209
+ * Use this method to extend the player with custom behavior.
1210
+ * The plugin class must inherit from one of the Clappr UIPlugin, UIContainerPlugin or CorePlugin classes.
1211
+ * A core plugin will be initialized and attached to the player when the player is initialized.
1212
+ * A UI plugin will be initialized and attached to the player container is initialized.
1213
+ *
1214
+ * @see {@link https://github.com/clappr/clappr/wiki/Architecture}
1215
+ * @example
1216
+ * ```ts
1217
+ * import MyPlugin from './MyPlugin.js'
1218
+ *
1219
+ * Player.registerPlugin(MyPlugin)
1220
+ * ```
1221
+ */
1222
+ static registerPlugin(plugin: PlayerPlugin): void;
1223
+ /**
1224
+ * Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
1225
+ * @param plugin - a plugin class
1226
+ */
1227
+ static unregisterPlugin(plugin: PlayerPlugin): void;
1228
+ private setConfig;
1229
+ private initPlayer;
1230
+ private tuneIn;
1231
+ private safeTriggerEvent;
1232
+ private events;
1233
+ private buildCoreOptions;
1234
+ private configurePlaybacks;
1235
+ private buildMediaSourcesList;
1236
+ private bindContainerEventListeners;
1237
+ private bindSizeManagementListeners;
1238
+ }
1239
+
1240
+ /**
1241
+ * Subsystems of a player component.
1242
+ * @beta
1243
+ */
1244
+ export declare type PlayerComponentType = 'container' | 'core' | 'playback';
1245
+
1246
+ /**
1247
+ * Configuration options for the player
1248
+ *
1249
+ * @remarks
1250
+ * You can specify multiple sources, each in two forms: just a plain URL or a full object with `source` and `mimeType` fields {@link PlayerMediaSource}.
1251
+ * The player will pick the first viable media source according to the source availability, and either the transport preference or standard transport selection order.
1252
+ *
1253
+ * `priorityTransport` is used to specify the preferred transport protocol
1254
+ * when multiple sources are available.
1255
+ * It will first try to use the transport specified if it's supported (by a playback engine) and the source is available.
1256
+ * Otherwise it will try the other transports in the regular order (dash, hls, mpegts).
1257
+ *
1258
+ * The `autoPlay` option should be used together with the {@link PlayerConfig.mute | mute} to avoid issues with the browsers' autoplay policies.
1259
+ *
1260
+ * Note that the `playbackType` is specified explicitly in the examle below, but a playback engine might be able to detect the type of the stream automatically.
1261
+ *
1262
+ * A plugin options can be specified in the configuration object under a unique key, typically corresponding to the plugin name.
1263
+ * The plugin object will have access to the internal normalized configuration object that contains all the custom options.
1264
+ * in the examle below, the `poster` field is the `Poster` plugin configuration options.
1265
+ *
1266
+ * @example
1267
+ * ```ts
1268
+ * {
1269
+ * autoPlay: true,
1270
+ * mute: true,
1271
+ * playbackType: 'live',
1272
+ * priorityTransport: 'dash',
1273
+ * sources: [{
1274
+ * source: 'https://example.com/myownair66.mpd',
1275
+ * mimeType: 'application/dash+xml',
1276
+ * }, {
1277
+ * source: 'https://example.com/myownair66.m3u8',
1278
+ * mimeType: 'application/x-mpegURL',
1279
+ * }],
1280
+ * poster: {
1281
+ * url: settings.poster,
1282
+ * },
1283
+ * }
1284
+ * ```
1285
+ * @beta
1286
+ */
1287
+ export declare interface PlayerConfig extends Record<string, unknown> {
1288
+ /**
1289
+ * Start playback automatically when the player is ready
1290
+ * @defaultValue false
1291
+ */
1292
+ autoPlay?: boolean;
1293
+ /**
1294
+ * Configuration settings for the DASH playback engine
1295
+ * @defaultValue \{\}
1296
+ * {@link https://cdn.dashjs.org/latest/jsdoc/module-Settings.html}
1297
+ */
1298
+ dash?: DashSettings;
1299
+ /**
1300
+ * Controls the debug output level
1301
+ * @defaultValue 'none'
1302
+ */
1303
+ debug?: PlayerDebugSettings;
1304
+ /**
1305
+ * A language code for the player UI, for example, `es`. Must reference a key in the {@link PlayerConfig.strings | strings} record.
1306
+ * @defaultValue 'en'
1307
+ */
1308
+ language?: string;
1309
+ /**
1310
+ * Repeat playback when the media ends.
1311
+ * Is used with the `vod` {@link PlayerConfig.playbackType | playbackType}
1312
+ * @defaultValue false
1313
+ */
1314
+ loop?: boolean;
1315
+ /**
1316
+ * Mute the audio output in order to comply with browsers' autoplay policy.
1317
+ * @defaultValue false
1318
+ */
1319
+ mute?: boolean;
1320
+ /**
1321
+ * The type of playback (live stream or video on demand).
1322
+ *
1323
+ * @defaultValue 'vod'
1324
+ */
1325
+ playbackType?: PlaybackType;
1326
+ /**
1327
+ * Preferred transport protocol when multiple sources are available.
1328
+ * @defaultValue 'dash'
1329
+ */
1330
+ priorityTransport?: TransportPreference;
1331
+ /**
1332
+ * List of media sources, at least one is required.
1333
+ */
1334
+ sources: PlayerMediaSource[];
1335
+ /**
1336
+ * Localization strings for the player UI.
1337
+ */
1338
+ strings?: TranslationSettings;
1339
+ }
1340
+
1341
+ /**
1342
+ * @remarks `true` is equivalent to `'all'`, `false` is equivalent to `'none'`
1343
+ * @beta
1344
+ */
1345
+ export declare type PlayerDebugSettings = PlayerDebugTag | boolean;
1346
+
1347
+ /**
1348
+ * Debug output category selector
1349
+ * @beta
1350
+ */
1351
+ export declare type PlayerDebugTag = 'all' | 'clappr' | 'dash' | 'hls' | 'none';
1352
+
1353
+ /**
1354
+ * A top-level event on the player object
1355
+ * @beta
1356
+ */
1357
+ export declare enum PlayerEvent {
1358
+ /**
1359
+ * Playback has reached the end of the media.
1360
+ */
1361
+ Ended = "ended",
1362
+ /**
1363
+ * An error occurred.
1364
+ * Parameters: {@link PlaybackError}
1365
+ */
1366
+ Error = "error",
1367
+ /**
1368
+ * The player has switched to or from the fullscreen mode.
1369
+ * Parameters:`boolean` isFullscreen
1370
+ */
1371
+ Fullscreen = "fullscreen",
1372
+ /**
1373
+ * The player is ready to use.
1374
+ */
1375
+ Ready = "ready",
1376
+ /**
1377
+ * Playback has started.
1378
+ */
1379
+ Play = "play",
1380
+ /**
1381
+ * Playback has been paused.
1382
+ */
1383
+ Pause = "pause",
1384
+ /**
1385
+ * The player's container has been resized.
1386
+ * Parameters: {@link ContainerSize}
1387
+ */
1388
+ Resize = "resize",
1389
+ /**
1390
+ * The player is seeking to a new position.
1391
+ */
1392
+ Seek = "seek",
1393
+ /**
1394
+ * Playback has been stopped.
1395
+ */
1396
+ Stop = "stop",
1397
+ /**
1398
+ * The current playback time has changed.
1399
+ * Parameters: {@link TimePosition}
1400
+ */
1401
+ TimeUpdate = "timeupdate",
1402
+ /**
1403
+ * The volume has changed.
1404
+ * Parameters: `number` volume in the range 0..1
1405
+ */
1406
+ VolumeUpdate = "volumeupdate"
1407
+ }
1408
+
1409
+ /**
1410
+ * Type of a listener callback function for a player event.
1411
+ * See the description of the event parameters in {@link PlayerEvent}.
1412
+ * @beta
1413
+ */
1414
+ export declare type PlayerEventHandler<E extends PlayerEvent> = (...args: PlayerEventParams<E>) => void;
1415
+
1416
+ /**
1417
+ * @beta
1418
+ */
1419
+ export declare type PlayerEventParams<E extends PlayerEvent> = E extends PlayerEvent.Seek ? [number] : E extends PlayerEvent.VolumeUpdate ? [number] : E extends PlayerEvent.TimeUpdate ? [TimePosition] : E extends PlayerEvent.Resize ? [{
1420
+ width: number;
1421
+ height: number;
1422
+ }] : E extends PlayerEvent.Fullscreen ? [boolean] : E extends PlayerEvent.Error ? [PlaybackError] : [];
1423
+
1424
+ /**
1425
+ * A media source to fetch the media data from
1426
+ * @beta
1427
+ */
1428
+ export declare type PlayerMediaSource = string | PlayerMediaSourceDesc;
1429
+
1430
+ /**
1431
+ * Describes a media source with its MIME type and URL.
1432
+ *
1433
+ * @remarks
1434
+ * When the MIME type is provided, it helps the player determine the appropriate playback engine.
1435
+ * If omitted, the player will attempt to detect the type from the source URL extension.
1436
+ * @beta
1437
+ */
1438
+ export declare interface PlayerMediaSourceDesc {
1439
+ /**
1440
+ * The MIME type of the media source (e.g. `"video/mp4"`, `"application/x-mpegURL"`).
1441
+ * Necessary if the type cannot be detected from file extension of the source URL.
1442
+ */
1443
+ mimeType?: string;
1444
+ /**
1445
+ * URL of the media source
1446
+ */
1447
+ source: string;
1448
+ }
1449
+
1450
+ /**
1451
+ * @beta
1452
+ * @see {@link https://clappr.github.io/classes/UIContainerPlugin.html}, {@link https://clappr.github.io/classes/ContainerPlugin.html}
1453
+ */
1454
+ export declare type PlayerPlugin = {
1455
+ new (...args: any[]): unknown;
1456
+ name: string;
1457
+ };
1458
+
1459
+ export declare type PluginSettings = {
1460
+ /**
1461
+ * Sends the statistics record to the storage.
1462
+ * The actual delivery is presumably async and batched.
1463
+ * @param data - The statistics record to send.
1464
+ */
1465
+ send: (data: StatisticsRecord) => void;
1466
+ };
1467
+
1468
+ export declare class Poster extends UIContainerPlugin {
1469
+ private hasFatalError;
1470
+ private hasStartedPlaying;
1471
+ private playRequested;
1472
+ private $playButton;
1473
+ private $playWrapper;
1474
+ get name(): string;
1475
+ get supportedVersion(): {
1476
+ min: string;
1477
+ };
1478
+ get template(): any;
1479
+ get shouldRender(): boolean;
1480
+ get attributes(): {
1481
+ class: string;
1482
+ 'data-poster': string;
1483
+ };
1484
+ get events(): {
1485
+ click: string;
1486
+ };
1487
+ get showOnVideoEnd(): boolean;
1488
+ bindEvents(): void;
1489
+ enable(): void;
1490
+ disable(): void;
1491
+ private onError;
1492
+ private onPlay;
1493
+ private onPlayIntent;
1494
+ private onStop;
1495
+ private updatePlayButton;
1496
+ private showPlayButton;
1497
+ private hidePlayButton;
1498
+ private clicked;
1499
+ private shouldHideOnPlay;
1500
+ private update;
1501
+ private updatePoster;
1502
+ private showPoster;
1503
+ private hidePoster;
1504
+ render(): this;
1505
+ destroy(): this;
1506
+ }
1507
+
1508
+ declare type PresentationalError = {
1509
+ title: string;
1510
+ message: string;
1511
+ code: string;
1512
+ icon: string;
1513
+ reloadIcon: string;
1514
+ };
1515
+
1516
+ /**
1517
+ * A level of quality within a media source.
1518
+ * @beta
1519
+ */
1520
+ export declare interface QualityLevel {
1521
+ /**
1522
+ * Zero-based index of the quality level.
1523
+ */
1524
+ level: number;
1525
+ /**
1526
+ * Width of the video, pixels.
1527
+ */
1528
+ width: number;
1529
+ /**
1530
+ * Height of the video, pixels.
1531
+ */
1532
+ height: number;
1533
+ /**
1534
+ * Bitrate of the video, bps.
1535
+ */
1536
+ bitrate: number;
1537
+ }
1538
+
1539
+ export { reportError_2 as reportError }
1540
+
1541
+ export declare class SeekTime extends UICorePlugin {
1542
+ get name(): string;
1543
+ get supportedVersion(): {
1544
+ min: string;
1545
+ };
1546
+ get template(): any;
1547
+ get attributes(): {
1548
+ class: string;
1549
+ 'data-seek-time': string;
1550
+ };
1551
+ get mediaControl(): any;
1552
+ get mediaControlContainer(): any;
1553
+ get isLiveStreamWithDvr(): any;
1554
+ get durationShown(): boolean;
1555
+ private hoveringOverSeekBar;
1556
+ private hoverPosition;
1557
+ private displayedDuration;
1558
+ private displayedSeekTime;
1559
+ private duration;
1560
+ private rendered;
1561
+ private $durationEl;
1562
+ private $seekTimeEl;
1563
+ bindEvents(): void;
1564
+ private onContainerChanged;
1565
+ private updateDuration;
1566
+ private showTime;
1567
+ private hideTime;
1568
+ private calculateHoverPosition;
1569
+ getSeekTime(): {
1570
+ seekTime: number;
1571
+ };
1572
+ update(): void;
1573
+ shouldBeVisible(): any;
1574
+ render(): this;
1575
+ }
1576
+
1577
+ export { SentryTracer }
1578
+
1579
+ export { setTracer }
1580
+
1581
+ export declare class Share extends UICorePlugin {
1582
+ private hide;
1583
+ private container;
1584
+ get name(): string;
1585
+ get supportedVersion(): {
1586
+ min: string;
1587
+ };
1588
+ get template(): any;
1589
+ get attributes(): {
1590
+ class: string;
1591
+ 'data-share': string;
1592
+ };
1593
+ get events(): {
1594
+ 'click [data-share-button]': string;
1595
+ 'click [data-share-close]': string;
1596
+ 'click [data-share-fb]': string;
1597
+ 'click [data-share-tw]': string;
1598
+ 'click [data-share-link]': string;
1599
+ 'click [data-share-embed]': string;
1600
+ };
1601
+ bindEvents(): void;
1602
+ unBindEvents(): void;
1603
+ canShowShare(): void;
1604
+ private onReady;
1605
+ render(): this;
1606
+ hideShare(): void;
1607
+ showShare(): void;
1608
+ initializeIcons(): void;
1609
+ onShareShow(): void;
1610
+ onShareHide(): void;
1611
+ onShareFB(): void;
1612
+ onShareTW(): void;
1613
+ onShareLinkClick(): void;
1614
+ onShareEmbedClick(): void;
1615
+ }
1616
+
1617
+ export declare class SkipTime extends UICorePlugin {
1618
+ get name(): string;
1619
+ get supportedVersion(): {
1620
+ min: string;
1621
+ };
1622
+ get container(): any;
1623
+ get template(): any;
1624
+ get attributes(): {
1625
+ class: string;
1626
+ 'data-skip-time': string;
1627
+ };
1628
+ private position;
1629
+ get events(): {
1630
+ 'click [data-skip-left]': string;
1631
+ 'click [data-skip-mid]': string;
1632
+ 'click [data-skip-right]': string;
1633
+ };
1634
+ bindEvents(): void;
1635
+ setBack(): void;
1636
+ handleRewindClicks(): void;
1637
+ setMidClick(): void;
1638
+ setForward(): void;
1639
+ toggleFullscreen(): void;
1640
+ render(): this;
1641
+ }
1642
+
1643
+ /**
1644
+ * This plugin is responsible for managing the automatic failover between sources.
1645
+ * @beta
1646
+ * @remarks
1647
+ * Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details
1648
+ * on how sources ordering and selection works.
1649
+ *
1650
+ * This plugin does not expose any public methods apart from required by the Clappr plugin interface.
1651
+ * It is supposed to work autonomously.
1652
+ *
1653
+ * @example
1654
+ * ```ts
1655
+ * import { SourceController } from '@gcorevideo/player'
1656
+ *
1657
+ * Player.registerPlugin(SourceController)
1658
+ * ```
1659
+ */
1660
+ export declare class SourceController extends CorePlugin {
1661
+ private sourcesList;
1662
+ private currentSourceIndex;
1663
+ private sourcesDelay;
1664
+ private active;
1665
+ private sync;
1666
+ get name(): string;
1667
+ get supportedVersion(): {
1668
+ min: string;
1669
+ };
1670
+ constructor(core: Core);
1671
+ /**
1672
+ * @internal
1673
+ */
1674
+ bindEvents(): void;
1675
+ private onReady;
1676
+ private bindContainerEventListeners;
1677
+ private reset;
1678
+ private retryPlayback;
1679
+ private getNextMediaSource;
1680
+ static get version(): string;
1681
+ }
1682
+
1683
+ export declare class SpinnerThreeBounce extends UIContainerPlugin {
1684
+ get name(): string;
1685
+ get supportedVersion(): {
1686
+ min: string;
1687
+ };
1688
+ get attributes(): {
1689
+ 'data-spinner': string;
1690
+ class: string;
1691
+ };
1692
+ private showTimeout;
1693
+ private template;
1694
+ private hasFatalError;
1695
+ private hasBuffering;
1696
+ constructor(container: Container);
1697
+ private onBuffering;
1698
+ private onBufferFull;
1699
+ private onPlay;
1700
+ private onStop;
1701
+ private onError;
1702
+ show(immediate?: boolean): void;
1703
+ hide(): void;
1704
+ render(): this;
1705
+ }
1706
+
1707
+ export declare class Statistics extends ContainerPlugin {
1708
+ get name(): string;
1709
+ get supportedVersion(): {
1710
+ min: string;
1711
+ };
1712
+ private started;
1713
+ private timeStart;
1714
+ private heatmapSent;
1715
+ private heatmapLastTime;
1716
+ private watchSent;
1717
+ private bufTracking;
1718
+ private lags;
1719
+ /**
1720
+ * The time when buffering last started.
1721
+ */
1722
+ private bufLastStarted;
1723
+ /**
1724
+ * The accumulated buffering duration.
1725
+ */
1726
+ private bufAccDuration;
1727
+ constructor(container: Container);
1728
+ bindEvents(): void;
1729
+ private startLevelSwitch;
1730
+ private stopLevelSwitch;
1731
+ private onBuffering;
1732
+ private onBufferFull;
1733
+ private onReady;
1734
+ private initEvent;
1735
+ private sendMessage;
1736
+ private send;
1737
+ private sendHeatmap;
1738
+ private onTimeUpdateLive;
1739
+ private onStart;
1740
+ }
1741
+
1742
+ declare type StatisticsEvent = 'init' | 'start' | 'watch' | 'heatmap';
1743
+
1744
+ declare type StatisticsEventData = Record<string, string | number | boolean>;
1745
+
1746
+ declare type StatisticsRecord = {
1747
+ event: StatisticsEvent;
1748
+ type: PlaybackType;
1749
+ } & StatisticsEventData;
1750
+
1751
+ export declare class Subtitles extends UICorePlugin {
1752
+ private currentContainer;
1753
+ private currentLevel;
1754
+ private currentPlayback;
1755
+ private isShowing;
1756
+ private tracks;
1757
+ private $string;
1758
+ get name(): string;
1759
+ get supportedVersion(): {
1760
+ min: string;
1761
+ };
1762
+ static get version(): string;
1763
+ get template(): any;
1764
+ get templateString(): any;
1765
+ get attributes(): {
1766
+ class: string;
1767
+ 'data-subtitles': string;
1768
+ };
1769
+ get events(): {
1770
+ 'click [data-subtitles-select]': string;
1771
+ 'click [data-subtitles-button]': string;
1772
+ };
1773
+ private isPreselectedApplied;
1774
+ private track;
1775
+ get preselectedLanguage(): string;
1776
+ bindEvents(): void;
1777
+ unBindEvents(): void;
1778
+ private bindPlaybackEvents;
1779
+ private getTracks;
1780
+ private onStartAd;
1781
+ private onFinishAd;
1782
+ reload(): void;
1783
+ private playerResize;
1784
+ hide(): void;
1785
+ show(): void;
1786
+ private shouldRender;
1787
+ private resizeFont;
1788
+ render(): this;
1789
+ private fillLevels;
1790
+ private findLevelBy;
1791
+ private selectLevel;
1792
+ private onLevelSelect;
1793
+ private applyPreselectedSubtitles;
1794
+ private onShowLevelSelectMenu;
1795
+ private hideSelectLevelMenu;
1796
+ private toggleContextMenu;
1797
+ buttonElement(): ZeptoResult;
1798
+ levelElement(id?: string): ZeptoResult;
1799
+ startLevelSwitch(): void;
1800
+ stopLevelSwitch(): void;
1801
+ selectSubtitles(): void;
1802
+ private setSubtitleText;
1803
+ private clearSubtitleText;
1804
+ private updateCurrentLevel;
1805
+ private highlightCurrentSubtitles;
1806
+ private renderIcon;
1807
+ }
1808
+
1809
+ export declare class Thumbnails extends UICorePlugin {
1810
+ private _$spotlight;
1811
+ private _$backdrop;
1812
+ private $container;
1813
+ private $img;
1814
+ private _$carousel;
1815
+ private $textThumbnail;
1816
+ private _$backdropCarouselImgs;
1817
+ private spriteSheetHeight;
1818
+ private _hoverPosition;
1819
+ private _show;
1820
+ private _thumbsLoaded;
1821
+ private _oldContainer;
1822
+ private _thumbs;
1823
+ get name(): string;
1824
+ get supportedVersion(): {
1825
+ min: string;
1826
+ };
1827
+ get attributes(): {
1828
+ class: string;
1829
+ };
1830
+ get template(): any;
1831
+ private buildSpriteConfig;
1832
+ bindEvents(): void;
1833
+ private _bindContainerEvents;
1834
+ private _onCoreReady;
1835
+ private loadSpriteSheet;
1836
+ private _onMediaControlContainerChanged;
1837
+ private _init;
1838
+ private _getOptions;
1839
+ private _appendElToMediaControl;
1840
+ private _onMouseMove;
1841
+ private _onMouseLeave;
1842
+ private _calculateHoverPosition;
1843
+ private _buildImg;
1844
+ private _loadBackdrop;
1845
+ setText(time: TimeValue): void;
1846
+ private _updateCarousel;
1847
+ private _updateSpotlightThumb;
1848
+ private _getThumbIndexForTime;
1849
+ private _renderPlugin;
1850
+ private _createElements;
1851
+ }
1852
+
1853
+ /**
1854
+ * Current playback time and total duration of the media.
1855
+ * @beta
1856
+ */
1857
+ export declare interface TimePosition {
1858
+ /**
1859
+ * Current playback time, 0..duration, seconds.
1860
+ */
1861
+ current: TimeValue;
1862
+ /**
1863
+ * Total duration of the media, seconds.
1864
+ */
1865
+ total: TimeValue;
1866
+ }
1867
+
1868
+ /**
1869
+ * For the plugin development
1870
+ * @beta
1871
+ */
1872
+ export declare type TimeProgress = TimePosition & {
1873
+ start: number;
1874
+ };
1875
+
1876
+ /**
1877
+ * @internal
1878
+ */
1879
+ export declare type TimerId = ReturnType<typeof setTimeout>;
1880
+
1881
+ /**
1882
+ * For the plugin development
1883
+ * @beta
1884
+ */
1885
+ export declare type TimeUpdate = TimePosition & {
1886
+ firstFragDateTime: number;
1887
+ };
1888
+
1889
+ /**
1890
+ * Playback time in seconds since the beginning of the stream (or a segment for the live streams)
1891
+ * @beta
1892
+ */
1893
+ export declare type TimeValue = number;
1894
+
1895
+ export { trace }
1896
+
1897
+ /**
1898
+ * @beta
1899
+ */
1900
+ export declare type TranslationKey = string;
1901
+
1902
+ /**
1903
+ * Localization strings for the player UI.
1904
+ * @remarks
1905
+ * The keys are language codes, and the values are objects with keys being the translation keys and values being the translations.
1906
+ *
1907
+ * This dictionary is used to localize the player UI, including the error messages and is shared across all the player components (including the plugins).
1908
+ *
1909
+ * @example
1910
+ * ```
1911
+ * {
1912
+ * en: {
1913
+ * play: 'Play',
1914
+ * ...
1915
+ * },
1916
+ * es: {
1917
+ * play: 'Reproducir',
1918
+ * ...
1919
+ * },
1920
+ * ...
1921
+ * }
1922
+ * ```
1923
+ *
1924
+ * @beta
1925
+ */
1926
+ export declare type TranslationSettings = Partial<Record<LangTag, Record<TranslationKey, string>>>;
1927
+
1928
+ /**
1929
+ * Preferred media delivery protocol
1930
+ * @beta
1931
+ */
1932
+ export declare type TransportPreference = MediaTransport;
1933
+
1934
+ declare type UpDown = 'up' | 'down';
1935
+
1936
+ /**
1937
+ * Version information about the gplayer and its main dependencies
1938
+ * @returns Version information about the gplayer and its main dependencies
1939
+ * @beta
1940
+ */
1941
+ export declare function version(): {
1942
+ gplayer: string;
1943
+ clappr: string;
1944
+ dashjs: string;
1945
+ hlsjs: string;
1946
+ };
1947
+
1948
+ /**
1949
+ * @beta
1950
+ */
1951
+ export declare class VolumeFade extends UICorePlugin {
1952
+ private _aboveBorderVolume;
1953
+ private container;
1954
+ private delay;
1955
+ private interval;
1956
+ get name(): string;
1957
+ bindEvents(): void;
1958
+ unBindEvents(): void;
1959
+ private _onUserChangeVolume;
1960
+ private _onVolumeConfig;
1961
+ private onCoreReady;
1962
+ private onEnter;
1963
+ private numberTo;
1964
+ private clearCurrentInterval;
1965
+ private onLeave;
1966
+ }
1967
+
1968
+ export declare enum VolumeFadeEvents {
1969
+ FADE = "core:volume:fade"
1970
+ }
1971
+
1972
+ /**
1973
+ * @beta
1974
+ */
1975
+ export declare type ZeptoResult = ReturnType<typeof $>;
1976
+
1977
+ export { }