@nomercy-entertainment/nomercy-player-core 2.0.0-rc.9 → 2.0.2

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 (622) hide show
  1. package/CHANGELOG.md +213 -0
  2. package/CONTRIBUTING.md +2 -2
  3. package/MIGRATION.md +15 -24
  4. package/README.md +82 -24
  5. package/RELEASING.md +46 -33
  6. package/dist/adapters/cue-parser/lrc.js +4 -2
  7. package/dist/adapters/cue-parser/lrc.js.map +1 -1
  8. package/dist/adapters/cue-parser/timestamp.d.ts +36 -0
  9. package/dist/adapters/cue-parser/timestamp.d.ts.map +1 -0
  10. package/dist/adapters/cue-parser/timestamp.js +68 -0
  11. package/dist/adapters/cue-parser/timestamp.js.map +1 -0
  12. package/dist/adapters/cue-parser/vtt.d.ts.map +1 -1
  13. package/dist/adapters/cue-parser/vtt.js +11 -29
  14. package/dist/adapters/cue-parser/vtt.js.map +1 -1
  15. package/dist/adapters/element-factory/dom.d.ts +1 -1
  16. package/dist/adapters/element-factory/dom.d.ts.map +1 -1
  17. package/dist/adapters/element-factory/dom.js.map +1 -1
  18. package/dist/adapters/event-bus/default.d.ts.map +1 -1
  19. package/dist/adapters/event-bus/default.js +23 -0
  20. package/dist/adapters/event-bus/default.js.map +1 -1
  21. package/dist/adapters/lifecycle-registry/default.d.ts.map +1 -1
  22. package/dist/adapters/lifecycle-registry/default.js +8 -6
  23. package/dist/adapters/lifecycle-registry/default.js.map +1 -1
  24. package/dist/adapters/logger/ILogger.d.ts +0 -2
  25. package/dist/adapters/logger/ILogger.d.ts.map +1 -1
  26. package/dist/adapters/logger/default.d.ts.map +1 -1
  27. package/dist/adapters/logger/default.js +1 -10
  28. package/dist/adapters/logger/default.js.map +1 -1
  29. package/dist/adapters/media-element/MediaElementBackend.d.ts +155 -0
  30. package/dist/adapters/media-element/MediaElementBackend.d.ts.map +1 -0
  31. package/dist/adapters/media-element/MediaElementBackend.js +210 -0
  32. package/dist/adapters/media-element/MediaElementBackend.js.map +1 -0
  33. package/dist/adapters/media-element/backend-lifecycle-bridge.d.ts +71 -0
  34. package/dist/adapters/media-element/backend-lifecycle-bridge.d.ts.map +1 -0
  35. package/dist/adapters/media-element/backend-lifecycle-bridge.js +49 -0
  36. package/dist/adapters/media-element/backend-lifecycle-bridge.js.map +1 -0
  37. package/dist/adapters/media-element/backend-state.d.ts +17 -0
  38. package/dist/adapters/media-element/backend-state.d.ts.map +1 -0
  39. package/dist/adapters/media-element/backend-state.js +20 -0
  40. package/dist/adapters/media-element/backend-state.js.map +1 -0
  41. package/dist/adapters/media-element/helpers.d.ts +161 -0
  42. package/dist/adapters/media-element/helpers.d.ts.map +1 -0
  43. package/dist/adapters/media-element/helpers.js +345 -0
  44. package/dist/adapters/media-element/helpers.js.map +1 -0
  45. package/dist/adapters/media-element/index.d.ts +9 -0
  46. package/dist/adapters/media-element/index.d.ts.map +1 -0
  47. package/dist/adapters/media-element/index.js +12 -0
  48. package/dist/adapters/media-element/index.js.map +1 -0
  49. package/dist/adapters/media-list/IMediaList.d.ts +2 -2
  50. package/dist/adapters/media-list/IMediaList.d.ts.map +1 -1
  51. package/dist/adapters/media-list/IMediaList.js +1 -1
  52. package/dist/adapters/media-list/IMediaList.js.map +1 -1
  53. package/dist/adapters/media-list/default.d.ts +3 -3
  54. package/dist/adapters/media-list/default.d.ts.map +1 -1
  55. package/dist/adapters/media-list/default.js +2 -2
  56. package/dist/adapters/media-list/default.js.map +1 -1
  57. package/dist/adapters/platform/browser.d.ts.map +1 -1
  58. package/dist/adapters/platform/browser.js +7 -2
  59. package/dist/adapters/platform/browser.js.map +1 -1
  60. package/dist/adapters/realtime/IRealtimeChannel.d.ts +1 -1
  61. package/dist/adapters/realtime/websocket.js +5 -5
  62. package/dist/adapters/realtime/websocket.js.map +1 -1
  63. package/dist/adapters/storage/local-storage.d.ts +6 -1
  64. package/dist/adapters/storage/local-storage.d.ts.map +1 -1
  65. package/dist/adapters/storage/local-storage.js +8 -2
  66. package/dist/adapters/storage/local-storage.js.map +1 -1
  67. package/dist/adapters/stream/hls.d.ts.map +1 -1
  68. package/dist/adapters/stream/hls.js +7 -6
  69. package/dist/adapters/stream/hls.js.map +1 -1
  70. package/dist/adapters/stream/native.js +2 -2
  71. package/dist/adapters/stream/native.js.map +1 -1
  72. package/dist/adapters/stream/registry.js +5 -5
  73. package/dist/adapters/stream/registry.js.map +1 -1
  74. package/dist/adapters/translator/loaders/translations-glob.d.ts +1 -1
  75. package/dist/adapters/translator/loaders/translations-glob.d.ts.map +1 -1
  76. package/dist/adapters/translator/loaders/translations-glob.js +6 -5
  77. package/dist/adapters/translator/loaders/translations-glob.js.map +1 -1
  78. package/dist/adapters/translator/translator.js +3 -3
  79. package/dist/adapters/translator/translator.js.map +1 -1
  80. package/dist/base-player.d.ts +1 -1
  81. package/dist/base-player.d.ts.map +1 -1
  82. package/dist/base-player.js +1 -0
  83. package/dist/base-player.js.map +1 -1
  84. package/dist/core/append-auth-token-param.d.ts.map +1 -1
  85. package/dist/core/append-auth-token-param.js +5 -2
  86. package/dist/core/append-auth-token-param.js.map +1 -1
  87. package/dist/core/auth-fetch/decode.js +2 -2
  88. package/dist/core/auth-fetch/decode.js.map +1 -1
  89. package/dist/core/auth-fetch/orchestrator.d.ts.map +1 -1
  90. package/dist/core/auth-fetch/orchestrator.js +7 -1
  91. package/dist/core/auth-fetch/orchestrator.js.map +1 -1
  92. package/dist/core/auth-fetch/prepare.d.ts +1 -1
  93. package/dist/core/auth-fetch/prepare.js +2 -2
  94. package/dist/core/auth-fetch/prepare.js.map +1 -1
  95. package/dist/core/chapters/fill-gaps.d.ts +53 -0
  96. package/dist/core/chapters/fill-gaps.d.ts.map +1 -0
  97. package/dist/core/chapters/fill-gaps.js +126 -0
  98. package/dist/core/chapters/fill-gaps.js.map +1 -0
  99. package/dist/core/config-merge.js +1 -1
  100. package/dist/core/config-merge.js.map +1 -1
  101. package/dist/core/cues/cue.js +3 -3
  102. package/dist/core/cues/cue.js.map +1 -1
  103. package/dist/core/cues/tracker.d.ts +1 -1
  104. package/dist/core/cues/tracker.d.ts.map +1 -1
  105. package/dist/core/cues/tracker.js +2 -2
  106. package/dist/core/cues/tracker.js.map +1 -1
  107. package/dist/core/dispatch.d.ts.map +1 -1
  108. package/dist/core/dispatch.js +6 -3
  109. package/dist/core/dispatch.js.map +1 -1
  110. package/dist/core/format.d.ts +47 -0
  111. package/dist/core/format.d.ts.map +1 -0
  112. package/dist/core/format.js +84 -0
  113. package/dist/core/format.js.map +1 -0
  114. package/dist/core/index.d.ts +32 -15
  115. package/dist/core/index.d.ts.map +1 -1
  116. package/dist/core/index.js +3 -0
  117. package/dist/core/index.js.map +1 -1
  118. package/dist/core/kit-version.js +1 -1
  119. package/dist/core/mixins/abr.d.ts +5 -2
  120. package/dist/core/mixins/abr.d.ts.map +1 -1
  121. package/dist/core/mixins/abr.js +9 -3
  122. package/dist/core/mixins/abr.js.map +1 -1
  123. package/dist/core/mixins/activity.d.ts +39 -0
  124. package/dist/core/mixins/activity.d.ts.map +1 -0
  125. package/dist/core/mixins/activity.js +144 -0
  126. package/dist/core/mixins/activity.js.map +1 -0
  127. package/dist/core/mixins/audio-output.d.ts.map +1 -1
  128. package/dist/core/mixins/audio-output.js +6 -5
  129. package/dist/core/mixins/audio-output.js.map +1 -1
  130. package/dist/core/mixins/auth.d.ts +12 -2
  131. package/dist/core/mixins/auth.d.ts.map +1 -1
  132. package/dist/core/mixins/auth.js +38 -13
  133. package/dist/core/mixins/auth.js.map +1 -1
  134. package/dist/core/mixins/cast.d.ts +5 -0
  135. package/dist/core/mixins/cast.d.ts.map +1 -1
  136. package/dist/core/mixins/cast.js +22 -5
  137. package/dist/core/mixins/cast.js.map +1 -1
  138. package/dist/core/mixins/container-class-emit.d.ts +16 -5
  139. package/dist/core/mixins/container-class-emit.d.ts.map +1 -1
  140. package/dist/core/mixins/container-class-emit.js +31 -14
  141. package/dist/core/mixins/container-class-emit.js.map +1 -1
  142. package/dist/core/mixins/dom-mixin.d.ts +1 -1
  143. package/dist/core/mixins/dom-mixin.d.ts.map +1 -1
  144. package/dist/core/mixins/dom-mixin.js.map +1 -1
  145. package/dist/core/mixins/experimental.d.ts.map +1 -1
  146. package/dist/core/mixins/experimental.js +2 -0
  147. package/dist/core/mixins/experimental.js.map +1 -1
  148. package/dist/core/mixins/i18n.d.ts +19 -4
  149. package/dist/core/mixins/i18n.d.ts.map +1 -1
  150. package/dist/core/mixins/i18n.js +35 -13
  151. package/dist/core/mixins/i18n.js.map +1 -1
  152. package/dist/core/mixins/lifecycle.d.ts +27 -9
  153. package/dist/core/mixins/lifecycle.d.ts.map +1 -1
  154. package/dist/core/mixins/lifecycle.js +187 -44
  155. package/dist/core/mixins/lifecycle.js.map +1 -1
  156. package/dist/core/mixins/loading.d.ts +8 -0
  157. package/dist/core/mixins/loading.d.ts.map +1 -1
  158. package/dist/core/mixins/loading.js +63 -5
  159. package/dist/core/mixins/loading.js.map +1 -1
  160. package/dist/core/mixins/media-tracks.d.ts +79 -17
  161. package/dist/core/mixins/media-tracks.d.ts.map +1 -1
  162. package/dist/core/mixins/media-tracks.js +364 -127
  163. package/dist/core/mixins/media-tracks.js.map +1 -1
  164. package/dist/core/mixins/player-state.d.ts +2 -2
  165. package/dist/core/mixins/player-state.d.ts.map +1 -1
  166. package/dist/core/mixins/plugin-registration.d.ts +31 -0
  167. package/dist/core/mixins/plugin-registration.d.ts.map +1 -1
  168. package/dist/core/mixins/plugin-registration.js +184 -92
  169. package/dist/core/mixins/plugin-registration.js.map +1 -1
  170. package/dist/core/mixins/queue.d.ts +13 -1
  171. package/dist/core/mixins/queue.d.ts.map +1 -1
  172. package/dist/core/mixins/queue.js +24 -4
  173. package/dist/core/mixins/queue.js.map +1 -1
  174. package/dist/core/mixins/sidecar-util.d.ts +18 -1
  175. package/dist/core/mixins/sidecar-util.d.ts.map +1 -1
  176. package/dist/core/mixins/sidecar-util.js +9 -0
  177. package/dist/core/mixins/sidecar-util.js.map +1 -1
  178. package/dist/core/mixins/state-mutators.d.ts +39 -47
  179. package/dist/core/mixins/state-mutators.d.ts.map +1 -1
  180. package/dist/core/mixins/state-mutators.js +61 -42
  181. package/dist/core/mixins/state-mutators.js.map +1 -1
  182. package/dist/core/mixins/time.d.ts +37 -4
  183. package/dist/core/mixins/time.d.ts.map +1 -1
  184. package/dist/core/mixins/time.js +83 -16
  185. package/dist/core/mixins/time.js.map +1 -1
  186. package/dist/core/mixins/transport.d.ts +2 -24
  187. package/dist/core/mixins/transport.d.ts.map +1 -1
  188. package/dist/core/mixins/transport.js +5 -13
  189. package/dist/core/mixins/transport.js.map +1 -1
  190. package/dist/core/mixins/volume.d.ts +50 -30
  191. package/dist/core/mixins/volume.d.ts.map +1 -1
  192. package/dist/core/mixins/volume.js +109 -43
  193. package/dist/core/mixins/volume.js.map +1 -1
  194. package/dist/core/plugin/base.d.ts +2 -2
  195. package/dist/core/plugin/base.d.ts.map +1 -1
  196. package/dist/core/plugin/base.js +6 -2
  197. package/dist/core/plugin/base.js.map +1 -1
  198. package/dist/core/plugin/fetch.d.ts +1 -1
  199. package/dist/core/plugin/fetch.d.ts.map +1 -1
  200. package/dist/core/plugin/fetch.js +4 -3
  201. package/dist/core/plugin/fetch.js.map +1 -1
  202. package/dist/core/plugin-translations.d.ts +28 -0
  203. package/dist/core/plugin-translations.d.ts.map +1 -0
  204. package/dist/core/plugin-translations.js +78 -0
  205. package/dist/core/plugin-translations.js.map +1 -0
  206. package/dist/core/state.d.ts +45 -19
  207. package/dist/core/state.d.ts.map +1 -1
  208. package/dist/core/state.js +11 -5
  209. package/dist/core/state.js.map +1 -1
  210. package/dist/core/title-tokens.d.ts +27 -0
  211. package/dist/core/title-tokens.d.ts.map +1 -0
  212. package/dist/core/title-tokens.js +41 -0
  213. package/dist/core/title-tokens.js.map +1 -0
  214. package/dist/core/volume-curve.d.ts +23 -18
  215. package/dist/core/volume-curve.d.ts.map +1 -1
  216. package/dist/core/volume-curve.js +23 -21
  217. package/dist/core/volume-curve.js.map +1 -1
  218. package/dist/i18n/af.d.ts +17 -0
  219. package/dist/i18n/af.d.ts.map +1 -0
  220. package/dist/i18n/af.js +64 -0
  221. package/dist/i18n/af.js.map +1 -0
  222. package/dist/i18n/ar.d.ts +17 -0
  223. package/dist/i18n/ar.d.ts.map +1 -0
  224. package/dist/i18n/ar.js +64 -0
  225. package/dist/i18n/ar.js.map +1 -0
  226. package/dist/i18n/bg.d.ts +17 -0
  227. package/dist/i18n/bg.d.ts.map +1 -0
  228. package/dist/i18n/bg.js +64 -0
  229. package/dist/i18n/bg.js.map +1 -0
  230. package/dist/i18n/bn.d.ts +17 -0
  231. package/dist/i18n/bn.d.ts.map +1 -0
  232. package/dist/i18n/bn.js +64 -0
  233. package/dist/i18n/bn.js.map +1 -0
  234. package/dist/i18n/ca.d.ts +17 -0
  235. package/dist/i18n/ca.d.ts.map +1 -0
  236. package/dist/i18n/ca.js +64 -0
  237. package/dist/i18n/ca.js.map +1 -0
  238. package/dist/i18n/cs.d.ts +17 -0
  239. package/dist/i18n/cs.d.ts.map +1 -0
  240. package/dist/i18n/cs.js +64 -0
  241. package/dist/i18n/cs.js.map +1 -0
  242. package/dist/i18n/cy.d.ts +17 -0
  243. package/dist/i18n/cy.d.ts.map +1 -0
  244. package/dist/i18n/cy.js +64 -0
  245. package/dist/i18n/cy.js.map +1 -0
  246. package/dist/i18n/da.d.ts +17 -0
  247. package/dist/i18n/da.d.ts.map +1 -0
  248. package/dist/i18n/da.js +64 -0
  249. package/dist/i18n/da.js.map +1 -0
  250. package/dist/i18n/de.d.ts +17 -0
  251. package/dist/i18n/de.d.ts.map +1 -0
  252. package/dist/i18n/de.js +64 -0
  253. package/dist/i18n/de.js.map +1 -0
  254. package/dist/i18n/el.d.ts +17 -0
  255. package/dist/i18n/el.d.ts.map +1 -0
  256. package/dist/i18n/el.js +64 -0
  257. package/dist/i18n/el.js.map +1 -0
  258. package/dist/i18n/en.d.ts +1 -0
  259. package/dist/i18n/en.d.ts.map +1 -1
  260. package/dist/i18n/en.js +3 -0
  261. package/dist/i18n/en.js.map +1 -1
  262. package/dist/i18n/es.d.ts +17 -0
  263. package/dist/i18n/es.d.ts.map +1 -0
  264. package/dist/i18n/es.js +64 -0
  265. package/dist/i18n/es.js.map +1 -0
  266. package/dist/i18n/et.d.ts +17 -0
  267. package/dist/i18n/et.d.ts.map +1 -0
  268. package/dist/i18n/et.js +64 -0
  269. package/dist/i18n/et.js.map +1 -0
  270. package/dist/i18n/eu.d.ts +17 -0
  271. package/dist/i18n/eu.d.ts.map +1 -0
  272. package/dist/i18n/eu.js +64 -0
  273. package/dist/i18n/eu.js.map +1 -0
  274. package/dist/i18n/fa.d.ts +17 -0
  275. package/dist/i18n/fa.d.ts.map +1 -0
  276. package/dist/i18n/fa.js +64 -0
  277. package/dist/i18n/fa.js.map +1 -0
  278. package/dist/i18n/fi.d.ts +17 -0
  279. package/dist/i18n/fi.d.ts.map +1 -0
  280. package/dist/i18n/fi.js +64 -0
  281. package/dist/i18n/fi.js.map +1 -0
  282. package/dist/i18n/fr.d.ts +17 -0
  283. package/dist/i18n/fr.d.ts.map +1 -0
  284. package/dist/i18n/fr.js +64 -0
  285. package/dist/i18n/fr.js.map +1 -0
  286. package/dist/i18n/ga.d.ts +17 -0
  287. package/dist/i18n/ga.d.ts.map +1 -0
  288. package/dist/i18n/ga.js +64 -0
  289. package/dist/i18n/ga.js.map +1 -0
  290. package/dist/i18n/gl.d.ts +17 -0
  291. package/dist/i18n/gl.d.ts.map +1 -0
  292. package/dist/i18n/gl.js +64 -0
  293. package/dist/i18n/gl.js.map +1 -0
  294. package/dist/i18n/gu.d.ts +17 -0
  295. package/dist/i18n/gu.d.ts.map +1 -0
  296. package/dist/i18n/gu.js +64 -0
  297. package/dist/i18n/gu.js.map +1 -0
  298. package/dist/i18n/he.d.ts +17 -0
  299. package/dist/i18n/he.d.ts.map +1 -0
  300. package/dist/i18n/he.js +64 -0
  301. package/dist/i18n/he.js.map +1 -0
  302. package/dist/i18n/hi.d.ts +17 -0
  303. package/dist/i18n/hi.d.ts.map +1 -0
  304. package/dist/i18n/hi.js +64 -0
  305. package/dist/i18n/hi.js.map +1 -0
  306. package/dist/i18n/hr.d.ts +17 -0
  307. package/dist/i18n/hr.d.ts.map +1 -0
  308. package/dist/i18n/hr.js +64 -0
  309. package/dist/i18n/hr.js.map +1 -0
  310. package/dist/i18n/hu.d.ts +17 -0
  311. package/dist/i18n/hu.d.ts.map +1 -0
  312. package/dist/i18n/hu.js +64 -0
  313. package/dist/i18n/hu.js.map +1 -0
  314. package/dist/i18n/hy.d.ts +17 -0
  315. package/dist/i18n/hy.d.ts.map +1 -0
  316. package/dist/i18n/hy.js +64 -0
  317. package/dist/i18n/hy.js.map +1 -0
  318. package/dist/i18n/id.d.ts +17 -0
  319. package/dist/i18n/id.d.ts.map +1 -0
  320. package/dist/i18n/id.js +64 -0
  321. package/dist/i18n/id.js.map +1 -0
  322. package/dist/i18n/is.d.ts +17 -0
  323. package/dist/i18n/is.d.ts.map +1 -0
  324. package/dist/i18n/is.js +64 -0
  325. package/dist/i18n/is.js.map +1 -0
  326. package/dist/i18n/it.d.ts +17 -0
  327. package/dist/i18n/it.d.ts.map +1 -0
  328. package/dist/i18n/it.js +64 -0
  329. package/dist/i18n/it.js.map +1 -0
  330. package/dist/i18n/ja.d.ts +17 -0
  331. package/dist/i18n/ja.d.ts.map +1 -0
  332. package/dist/i18n/ja.js +64 -0
  333. package/dist/i18n/ja.js.map +1 -0
  334. package/dist/i18n/ka.d.ts +17 -0
  335. package/dist/i18n/ka.d.ts.map +1 -0
  336. package/dist/i18n/ka.js +64 -0
  337. package/dist/i18n/ka.js.map +1 -0
  338. package/dist/i18n/kk.d.ts +17 -0
  339. package/dist/i18n/kk.d.ts.map +1 -0
  340. package/dist/i18n/kk.js +64 -0
  341. package/dist/i18n/kk.js.map +1 -0
  342. package/dist/i18n/km.d.ts +17 -0
  343. package/dist/i18n/km.d.ts.map +1 -0
  344. package/dist/i18n/km.js +64 -0
  345. package/dist/i18n/km.js.map +1 -0
  346. package/dist/i18n/kn.d.ts +17 -0
  347. package/dist/i18n/kn.d.ts.map +1 -0
  348. package/dist/i18n/kn.js +64 -0
  349. package/dist/i18n/kn.js.map +1 -0
  350. package/dist/i18n/ko.d.ts +17 -0
  351. package/dist/i18n/ko.d.ts.map +1 -0
  352. package/dist/i18n/ko.js +64 -0
  353. package/dist/i18n/ko.js.map +1 -0
  354. package/dist/i18n/ku.d.ts +17 -0
  355. package/dist/i18n/ku.d.ts.map +1 -0
  356. package/dist/i18n/ku.js +64 -0
  357. package/dist/i18n/ku.js.map +1 -0
  358. package/dist/i18n/ky.d.ts +17 -0
  359. package/dist/i18n/ky.d.ts.map +1 -0
  360. package/dist/i18n/ky.js +64 -0
  361. package/dist/i18n/ky.js.map +1 -0
  362. package/dist/i18n/lo.d.ts +17 -0
  363. package/dist/i18n/lo.d.ts.map +1 -0
  364. package/dist/i18n/lo.js +64 -0
  365. package/dist/i18n/lo.js.map +1 -0
  366. package/dist/i18n/lt.d.ts +17 -0
  367. package/dist/i18n/lt.d.ts.map +1 -0
  368. package/dist/i18n/lt.js +64 -0
  369. package/dist/i18n/lt.js.map +1 -0
  370. package/dist/i18n/lv.d.ts +17 -0
  371. package/dist/i18n/lv.d.ts.map +1 -0
  372. package/dist/i18n/lv.js +64 -0
  373. package/dist/i18n/lv.js.map +1 -0
  374. package/dist/i18n/mk.d.ts +17 -0
  375. package/dist/i18n/mk.d.ts.map +1 -0
  376. package/dist/i18n/mk.js +64 -0
  377. package/dist/i18n/mk.js.map +1 -0
  378. package/dist/i18n/ml.d.ts +17 -0
  379. package/dist/i18n/ml.d.ts.map +1 -0
  380. package/dist/i18n/ml.js +64 -0
  381. package/dist/i18n/ml.js.map +1 -0
  382. package/dist/i18n/mn.d.ts +17 -0
  383. package/dist/i18n/mn.d.ts.map +1 -0
  384. package/dist/i18n/mn.js +64 -0
  385. package/dist/i18n/mn.js.map +1 -0
  386. package/dist/i18n/mr.d.ts +17 -0
  387. package/dist/i18n/mr.d.ts.map +1 -0
  388. package/dist/i18n/mr.js +64 -0
  389. package/dist/i18n/mr.js.map +1 -0
  390. package/dist/i18n/ms.d.ts +17 -0
  391. package/dist/i18n/ms.d.ts.map +1 -0
  392. package/dist/i18n/ms.js +64 -0
  393. package/dist/i18n/ms.js.map +1 -0
  394. package/dist/i18n/my.d.ts +17 -0
  395. package/dist/i18n/my.d.ts.map +1 -0
  396. package/dist/i18n/my.js +64 -0
  397. package/dist/i18n/my.js.map +1 -0
  398. package/dist/i18n/nb.d.ts +17 -0
  399. package/dist/i18n/nb.d.ts.map +1 -0
  400. package/dist/i18n/nb.js +64 -0
  401. package/dist/i18n/nb.js.map +1 -0
  402. package/dist/i18n/ne.d.ts +17 -0
  403. package/dist/i18n/ne.d.ts.map +1 -0
  404. package/dist/i18n/ne.js +64 -0
  405. package/dist/i18n/ne.js.map +1 -0
  406. package/dist/i18n/nl.d.ts +1 -0
  407. package/dist/i18n/nl.d.ts.map +1 -1
  408. package/dist/i18n/nl.js +3 -0
  409. package/dist/i18n/nl.js.map +1 -1
  410. package/dist/i18n/nn.d.ts +17 -0
  411. package/dist/i18n/nn.d.ts.map +1 -0
  412. package/dist/i18n/nn.js +64 -0
  413. package/dist/i18n/nn.js.map +1 -0
  414. package/dist/i18n/no.d.ts +17 -0
  415. package/dist/i18n/no.d.ts.map +1 -0
  416. package/dist/i18n/no.js +64 -0
  417. package/dist/i18n/no.js.map +1 -0
  418. package/dist/i18n/oc.d.ts +17 -0
  419. package/dist/i18n/oc.d.ts.map +1 -0
  420. package/dist/i18n/oc.js +64 -0
  421. package/dist/i18n/oc.js.map +1 -0
  422. package/dist/i18n/pa.d.ts +17 -0
  423. package/dist/i18n/pa.d.ts.map +1 -0
  424. package/dist/i18n/pa.js +64 -0
  425. package/dist/i18n/pa.js.map +1 -0
  426. package/dist/i18n/pl.d.ts +17 -0
  427. package/dist/i18n/pl.d.ts.map +1 -0
  428. package/dist/i18n/pl.js +64 -0
  429. package/dist/i18n/pl.js.map +1 -0
  430. package/dist/i18n/pt-BR.d.ts +17 -0
  431. package/dist/i18n/pt-BR.d.ts.map +1 -0
  432. package/dist/i18n/pt-BR.js +64 -0
  433. package/dist/i18n/pt-BR.js.map +1 -0
  434. package/dist/i18n/pt.d.ts +17 -0
  435. package/dist/i18n/pt.d.ts.map +1 -0
  436. package/dist/i18n/pt.js +64 -0
  437. package/dist/i18n/pt.js.map +1 -0
  438. package/dist/i18n/ro.d.ts +17 -0
  439. package/dist/i18n/ro.d.ts.map +1 -0
  440. package/dist/i18n/ro.js +64 -0
  441. package/dist/i18n/ro.js.map +1 -0
  442. package/dist/i18n/ru.d.ts +17 -0
  443. package/dist/i18n/ru.d.ts.map +1 -0
  444. package/dist/i18n/ru.js +64 -0
  445. package/dist/i18n/ru.js.map +1 -0
  446. package/dist/i18n/si.d.ts +17 -0
  447. package/dist/i18n/si.d.ts.map +1 -0
  448. package/dist/i18n/si.js +64 -0
  449. package/dist/i18n/si.js.map +1 -0
  450. package/dist/i18n/sk.d.ts +17 -0
  451. package/dist/i18n/sk.d.ts.map +1 -0
  452. package/dist/i18n/sk.js +64 -0
  453. package/dist/i18n/sk.js.map +1 -0
  454. package/dist/i18n/sl.d.ts +17 -0
  455. package/dist/i18n/sl.d.ts.map +1 -0
  456. package/dist/i18n/sl.js +64 -0
  457. package/dist/i18n/sl.js.map +1 -0
  458. package/dist/i18n/sq.d.ts +17 -0
  459. package/dist/i18n/sq.d.ts.map +1 -0
  460. package/dist/i18n/sq.js +64 -0
  461. package/dist/i18n/sq.js.map +1 -0
  462. package/dist/i18n/sr.d.ts +17 -0
  463. package/dist/i18n/sr.d.ts.map +1 -0
  464. package/dist/i18n/sr.js +64 -0
  465. package/dist/i18n/sr.js.map +1 -0
  466. package/dist/i18n/sv.d.ts +17 -0
  467. package/dist/i18n/sv.d.ts.map +1 -0
  468. package/dist/i18n/sv.js +64 -0
  469. package/dist/i18n/sv.js.map +1 -0
  470. package/dist/i18n/sw.d.ts +17 -0
  471. package/dist/i18n/sw.d.ts.map +1 -0
  472. package/dist/i18n/sw.js +64 -0
  473. package/dist/i18n/sw.js.map +1 -0
  474. package/dist/i18n/ta.d.ts +17 -0
  475. package/dist/i18n/ta.d.ts.map +1 -0
  476. package/dist/i18n/ta.js +64 -0
  477. package/dist/i18n/ta.js.map +1 -0
  478. package/dist/i18n/te.d.ts +17 -0
  479. package/dist/i18n/te.d.ts.map +1 -0
  480. package/dist/i18n/te.js +64 -0
  481. package/dist/i18n/te.js.map +1 -0
  482. package/dist/i18n/tg.d.ts +17 -0
  483. package/dist/i18n/tg.d.ts.map +1 -0
  484. package/dist/i18n/tg.js +64 -0
  485. package/dist/i18n/tg.js.map +1 -0
  486. package/dist/i18n/th.d.ts +17 -0
  487. package/dist/i18n/th.d.ts.map +1 -0
  488. package/dist/i18n/th.js +64 -0
  489. package/dist/i18n/th.js.map +1 -0
  490. package/dist/i18n/tl.d.ts +17 -0
  491. package/dist/i18n/tl.d.ts.map +1 -0
  492. package/dist/i18n/tl.js +64 -0
  493. package/dist/i18n/tl.js.map +1 -0
  494. package/dist/i18n/tr.d.ts +17 -0
  495. package/dist/i18n/tr.d.ts.map +1 -0
  496. package/dist/i18n/tr.js +64 -0
  497. package/dist/i18n/tr.js.map +1 -0
  498. package/dist/i18n/uk.d.ts +17 -0
  499. package/dist/i18n/uk.d.ts.map +1 -0
  500. package/dist/i18n/uk.js +64 -0
  501. package/dist/i18n/uk.js.map +1 -0
  502. package/dist/i18n/ur.d.ts +17 -0
  503. package/dist/i18n/ur.d.ts.map +1 -0
  504. package/dist/i18n/ur.js +64 -0
  505. package/dist/i18n/ur.js.map +1 -0
  506. package/dist/i18n/uz.d.ts +17 -0
  507. package/dist/i18n/uz.d.ts.map +1 -0
  508. package/dist/i18n/uz.js +64 -0
  509. package/dist/i18n/uz.js.map +1 -0
  510. package/dist/i18n/vi.d.ts +17 -0
  511. package/dist/i18n/vi.d.ts.map +1 -0
  512. package/dist/i18n/vi.js +64 -0
  513. package/dist/i18n/vi.js.map +1 -0
  514. package/dist/i18n/xh.d.ts +17 -0
  515. package/dist/i18n/xh.d.ts.map +1 -0
  516. package/dist/i18n/xh.js +64 -0
  517. package/dist/i18n/xh.js.map +1 -0
  518. package/dist/i18n/yo.d.ts +17 -0
  519. package/dist/i18n/yo.d.ts.map +1 -0
  520. package/dist/i18n/yo.js +64 -0
  521. package/dist/i18n/yo.js.map +1 -0
  522. package/dist/i18n/zh-TW.d.ts +17 -0
  523. package/dist/i18n/zh-TW.d.ts.map +1 -0
  524. package/dist/i18n/zh-TW.js +64 -0
  525. package/dist/i18n/zh-TW.js.map +1 -0
  526. package/dist/i18n/zh.d.ts +17 -0
  527. package/dist/i18n/zh.d.ts.map +1 -0
  528. package/dist/i18n/zh.js +64 -0
  529. package/dist/i18n/zh.js.map +1 -0
  530. package/dist/i18n/zu.d.ts +17 -0
  531. package/dist/i18n/zu.d.ts.map +1 -0
  532. package/dist/i18n/zu.js +64 -0
  533. package/dist/i18n/zu.js.map +1 -0
  534. package/dist/index.d.ts +28 -18
  535. package/dist/index.d.ts.map +1 -1
  536. package/dist/index.js +15 -5
  537. package/dist/index.js.map +1 -1
  538. package/dist/kit-translations.d.ts +14 -0
  539. package/dist/kit-translations.d.ts.map +1 -0
  540. package/dist/kit-translations.js +101 -0
  541. package/dist/kit-translations.js.map +1 -0
  542. package/dist/plugins/audio-graph/index.d.ts.map +1 -1
  543. package/dist/plugins/audio-graph/index.js +7 -8
  544. package/dist/plugins/audio-graph/index.js.map +1 -1
  545. package/dist/plugins/canvas/index.d.ts +8 -6
  546. package/dist/plugins/canvas/index.d.ts.map +1 -1
  547. package/dist/plugins/canvas/index.js +36 -18
  548. package/dist/plugins/canvas/index.js.map +1 -1
  549. package/dist/plugins/cast-sender/index.d.ts +13 -2
  550. package/dist/plugins/cast-sender/index.d.ts.map +1 -1
  551. package/dist/plugins/cast-sender/index.js +11 -6
  552. package/dist/plugins/cast-sender/index.js.map +1 -1
  553. package/dist/plugins/equalizer/index.js +36 -36
  554. package/dist/plugins/equalizer/index.js.map +1 -1
  555. package/dist/plugins/key-handler/index.d.ts +4 -4
  556. package/dist/plugins/key-handler/index.d.ts.map +1 -1
  557. package/dist/plugins/key-handler/index.js +4 -4
  558. package/dist/plugins/key-handler/index.js.map +1 -1
  559. package/dist/plugins/media-session/index.d.ts +8 -1
  560. package/dist/plugins/media-session/index.d.ts.map +1 -1
  561. package/dist/plugins/media-session/index.js +12 -1
  562. package/dist/plugins/media-session/index.js.map +1 -1
  563. package/dist/plugins/spectrum/index.d.ts +48 -0
  564. package/dist/plugins/spectrum/index.d.ts.map +1 -1
  565. package/dist/plugins/spectrum/index.js +210 -7
  566. package/dist/plugins/spectrum/index.js.map +1 -1
  567. package/dist/plugins/tab-leader/index.d.ts +2 -7
  568. package/dist/plugins/tab-leader/index.d.ts.map +1 -1
  569. package/dist/plugins/tab-leader/index.js +11 -12
  570. package/dist/plugins/tab-leader/index.js.map +1 -1
  571. package/dist/plugins/visualization/index.d.ts +77 -0
  572. package/dist/plugins/visualization/index.d.ts.map +1 -1
  573. package/dist/plugins/visualization/index.js +17 -3
  574. package/dist/plugins/visualization/index.js.map +1 -1
  575. package/dist/testing/contract.d.ts.map +1 -1
  576. package/dist/testing/contract.js +11 -10
  577. package/dist/testing/contract.js.map +1 -1
  578. package/dist/testing/describe-plugin-against.d.ts +2 -2
  579. package/dist/testing/describe-plugin-against.d.ts.map +1 -1
  580. package/dist/testing/describe-plugin-against.js +13 -7
  581. package/dist/testing/describe-plugin-against.js.map +1 -1
  582. package/dist/testing/describe-plugin.d.ts.map +1 -1
  583. package/dist/testing/describe-plugin.js +25 -9
  584. package/dist/testing/describe-plugin.js.map +1 -1
  585. package/dist/testing/leak-harness.d.ts +1 -1
  586. package/dist/testing/leak-harness.d.ts.map +1 -1
  587. package/dist/testing/leak-harness.js +2 -1
  588. package/dist/testing/leak-harness.js.map +1 -1
  589. package/dist/testing/stub-player.d.ts +19 -14
  590. package/dist/testing/stub-player.d.ts.map +1 -1
  591. package/dist/testing/stub-player.js +65 -22
  592. package/dist/testing/stub-player.js.map +1 -1
  593. package/dist/types/chapter.d.ts +7 -0
  594. package/dist/types/chapter.d.ts.map +1 -1
  595. package/dist/types/config.d.ts +36 -11
  596. package/dist/types/config.d.ts.map +1 -1
  597. package/dist/types/events.d.ts +153 -14
  598. package/dist/types/events.d.ts.map +1 -1
  599. package/dist/types/index.d.ts +3 -3
  600. package/dist/types/index.d.ts.map +1 -1
  601. package/dist/types/index.js +1 -1
  602. package/dist/types/index.js.map +1 -1
  603. package/dist/types/playback.d.ts +5 -2
  604. package/dist/types/playback.d.ts.map +1 -1
  605. package/dist/types/player.d.ts +114 -51
  606. package/dist/types/player.d.ts.map +1 -1
  607. package/dist/types/player.js.map +1 -1
  608. package/dist/types/plugin.d.ts +28 -0
  609. package/dist/types/plugin.d.ts.map +1 -1
  610. package/dist/types/state.d.ts +26 -0
  611. package/dist/types/state.d.ts.map +1 -1
  612. package/dist/types/state.js +28 -0
  613. package/dist/types/state.js.map +1 -1
  614. package/dist/types/tracks.d.ts +22 -0
  615. package/dist/types/tracks.d.ts.map +1 -1
  616. package/dist/vite-plugin.js +1 -1
  617. package/dist/vite-plugin.js.map +1 -1
  618. package/package.json +7 -8
  619. package/dist/compat.d.ts +0 -42
  620. package/dist/compat.d.ts.map +0 -1
  621. package/dist/compat.js +0 -42
  622. package/dist/compat.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,218 @@
1
1
  # Changelog — @nomercy-entertainment/nomercy-player-core
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [2.0.1] — 2026-07-18
6
+
7
+ First published stable of the v2 line (2.0.0 was withdrawn before release, so 2.0.1 is the first stable on npm). The core now publishes under the `latest` dist-tag, so a plain `npm install @nomercy-entertainment/nomercy-player-core` resolves `2.0.1` instead of the stale `2.0.0-rc.2` that predated `publishConfig.tag`. This promotes the `2.0.0-rc.33` surface to stable with no runtime or signature changes; consumers already installing `@rc` are running the same code.
8
+
9
+ ## [2.0.0-rc.33] — 2026-07-16
10
+
11
+ ### Fixed
12
+
13
+ - `bandwidth()` now returns the live estimate instead of permanently reporting `0`. The getter read a `_bandwidthEstimate` cache field that nothing ever wrote, while `bandwidthEstimator(fn)` wrote a same-looking `_bandwidthEstimator` field that nothing ever read — the two names never met. The dead cache field is gone; `bandwidth()` resolves on every read, honoring a consumer's `bandwidthEstimator()` override first, else the backend's optional `bandwidthEstimate?()` capability. Return type and unit (bits per second) are unchanged — additive fix, no signature change. Unblocks network-aware live-transcode step-down: consumers report this value upstream so the media server can drop encode quality on a degraded link.
14
+
15
+ ## [2.0.0-rc.32] — 2026-07-14
16
+
17
+ ### Fixed
18
+
19
+ - `subtitle(idx)` now resolves against the same deduped track list `subtitles()` returns. Both readers previously built their counts differently — `subtitle(idx)` compared the requested index against the backend's raw `subtitleTracks().length` while `subtitles()` built its list from the deduped count — so a backend track displaced by a same-language sidecar shifted every subsequent selection by one, silencing one track while selecting its neighbour. A backend-origin pick is now remapped to its raw backend index by id (falling back to language+label+url) before `setSubtitleTrack` is called.
20
+
21
+ ## [2.0.0-rc.31] — 2026-07-11
22
+
23
+ ### Fixed
24
+
25
+ - `PlayState.LOADING` and `PlayState.ERROR` are now reachable — the enum documented six states but `playState()` could only ever return four. `playState()` reports `LOADING` while a `load()` is in flight (every load, including the initial auto-load and re-loads out of `ERROR`), settling to `PAUSED` when media mounts without playback or staying with whatever a raced `play()` / `pause()` / `stop()` set; a failed load restores the state it displaced. A `fatal` dispatch — the kit's unrecoverable-failure channel — flips the state to `ERROR` before the listener chain runs; non-fatal `error` / `warning` / `info` events never touch it, and the next successful `load()` clears `ERROR` through `LOADING` again. Additive against the published type contract: consumers switching on `playState()` now actually see the two states the enum always promised.
26
+
27
+ ## [2.0.0-rc.29] — 2026-07-05
28
+
29
+ ### Fixed
30
+
31
+ - The typed `subtitles: [{ url, label, language, ... }]` playlist-item field is now actually read: `subtitles()` lists those tracks (typed field first, v1/server wire `tracks: [{ kind: 'subtitles', file }]` after, URL-deduped across both) and `subtitle(idx)` activates them through the same deduped list, so the public track list and index-based selection can never disagree. Previously only the wire `tracks` shape was consulted and items using the documented typed field silently exposed no subtitle tracks.
32
+ - `chapters()` no longer requires the item to ALSO carry a non-empty wire `tracks` array before returning the item's `chapters` — the accidental gate meant a typed-field-only item reported no chapters.
33
+
34
+ ## [2.0.0-rc.28] — 2026-07-05
35
+
36
+ ### Changed
37
+
38
+ - The `time` event now carries the full `TimeState` snapshot — `time`, `position`, `duration`, `buffered`, `remaining`, `percentage` — instead of `{ time }` alone, so listeners paint clocks and progress bars straight from the payload without re-deriving time math from getters inside the handler. `TimeState` itself gains the `time` field (alias of `position`, the classic name every existing `({ time }) => …` listener already destructures), and `timeData()` returns the same widened shape. Existing listeners are unaffected; code that *emits* `time` manually (tests, harnesses) must now build the full payload — `player.timeData()` or the new internal `_timeStateAt(position)` used by the per-library `timeupdate` bridges (the internal position slot syncs *from* the event, so payloads are built from the backend's fresh position).
39
+
40
+ ## [2.0.0-rc.27] — 2026-07-04
41
+
42
+ ### Fixed
43
+
44
+ - The built-in activity tracker now hides the controls immediately when the pointer leaves the container while playing (`mouseleave` → the same maybe-hide rule the desktop UI runs), instead of waiting out the full inactivity countdown. Paused players keep their controls up on mouse-out, unchanged.
45
+
46
+ ## [2.0.0-rc.26] — 2026-07-04
47
+
48
+ ### Added
49
+
50
+ - Player-owned activity tracking. The player now watches its own container for pointer, touch, and key input, emits `activity { active }` on the bus, and the existing container-class rules keep `.active` / `.inactive` on `.nomercyplayer` in sync — any UI (a hand-built plugin, plain CSS) inherits show/hide behavior from the classes with zero wiring, matching the v1 contract where the player owned autohide. Hiding only happens while playing; pausing keeps controls up; a `play` subscription re-arms the countdown after resumes the DOM cannot see (MediaSession, remote commands). New public surface: `bumpActivity()` (mark the viewer active now, e.g. after interactions the DOM can't observe), `activityTracking()` / `activityTracking(false)` (a UI plugin with its own richer activity state machine takes over as sole emitter — the video `DesktopUiPlugin` does this), and the `inactivityMs` config knob (default 4000, `0` disables). Pair this release with the video/music releases of the same day: an older `DesktopUiPlugin` running against this core would double-emit activity until its own release adds the takeover call.
51
+
52
+ ## [2.0.0-rc.25] — 2026-07-04
53
+
54
+ ### Added
55
+
56
+ - The kit's own translation bundle is now wired into the default translator. `core.*` keys (network, auth, browser-policy, media, DRM, state, and accessibility announcements) resolve out of the box in 79 locales — previously the bundle shipped but was never loaded, so `t('core.network.timeout')` returned the raw key for any consumer who did not manually pass `enTranslations`. English is seeded eagerly as the synchronous fallback; other kit languages lazy-load on demand (the active BCP-47 chain only, never all 79 at once). Consumer-supplied `translations` and `loadTranslations` still win on same-key collisions.
57
+
58
+ ### Changed
59
+
60
+ - **Breaking vs rc.24 (types only):** `subtitle()`, `subtitles()`, and `subtitleStyle()` are no longer declared on the shared `IPlayer` interface — they are video-only capability members on `IVideoPlayer` in `nomercy-video-player`. They were meaningless for audio and always threw `NotImplementedError` on the music player, so the shared type promised an API that never worked there. Runtime behavior is unchanged for video consumers; the shared mixin still carries the implementation. Music code that referenced these members could never have worked and now fails at compile time instead of at runtime.
61
+ - Visualization and canvas render failures now surface through the structured plugin error contract instead of `console.error`. A throwing visualization renderer reports `visualization:render/failed` and the plugin instance disables itself on first failure (no error storm from the rAF loop); a throwing canvas renderer reports `canvas:render/renderer-failed` and only that renderer is dropped — other renderers on the shared canvas keep running.
62
+
63
+ ### Fixed
64
+
65
+ - `addPlugin(X).ready()` no longer resolves before a post-setup plugin registration has actually finished. Plugins that carry lazy translation bundles added awaited work inside registration that `ready()` did not track, so `getPluginById()` could return `undefined` immediately after the await. Registration promises are now drained by `ready()`, and a throwing lazy translation loader surfaces as `plugin:failed` instead of vanishing silently (it previously sat outside the failure-handling try/catch).
66
+ - The plugin conformance harness (`testing/describePlugin`) now loads a plugin's static translations with the same prototype-chain-walk and lazy-load semantics as the real registration pipeline, so `this.t()` resolves under conformance tests instead of returning the raw key.
67
+ - MIGRATION.md corrections: the per-package guide links pointed at directories that no longer exist, the "no APIs were removed" claim contradicted the music package's documented port removals, and the extension-points table listed ports (`ISimilarityEngine`, `ILyricSource`, `INowPlayingArt`) that are not part of the public surface. The table now reflects the real exported subpaths.
68
+ - Stopped shipping the embedded `./eslint-plugin` subpath export. The lint rules are dev tooling, not part of the player runtime contract; freezing them into the package's public surface for the whole 2.x line would have made their removal a semver-major change. They move to the standalone `@nomercy-entertainment/eslint-plugin-player` package (see RELEASING.md for the publish-day sequencing).
69
+
70
+ ## [2.0.0-rc.24] — 2026-07-04
71
+
72
+ ### Fixed
73
+
74
+ - `perceptualGain()` — the shared position→gain volume curve — replaced the −60 dB…0 dB broadcast fader law with the consumer power taper `gain = position²`. The old law put the 50% slider at −30 dB (gain 0.0316), leaving everything below ~70% barely audible. Now 50% → 0.25 (−12 dB), 60% → 0.36 (−8.9 dB), endpoints exact (0 → silence, 1 → unity), and the sub-1% hard-floor snap is gone. Both libraries inherit the fix (`MediaElementBackend` + the music WebAudio/HTML5 backends); crossfade ramps read already-curved live gains and are unaffected.
75
+
76
+ ## [2.0.0-rc.23] — 2026-07-03
77
+
78
+ ### Added
79
+
80
+ - `plugins?: ReadonlyArray<PluginSpec>` on `BasePlayerConfig` — declarative plugin registration via `setup({ plugins: [...] })`. Each entry is a bare class ref or `{ plugin, opts }`. Sugar over calling `addPlugin()` before `setup()`, not a second registration path: same `pluginsRegistering` pipeline stage, same `core:plugin/duplicate-id` / `-missing-dep` / `-version-mismatch` / `-incompatible-core-version` validation, same timing. Fixes the pre-setup addPlugin() window being easy to miss (a re-render or late framework lifecycle hook silently no-ops registration). `nomercy-video-player` and `nomercy-music-player` inherit this for free — both already spread the full config through their `setup()` wrappers, no changes needed in either package.
81
+
82
+ ### Fixed
83
+
84
+ - `EventEmitter.on()` (and `.once()`) now `console.warn`s when a consumer subscribes to a renamed-away event name (currently `'current'`, renamed to `'item'`), naming the replacement. The bare-`string` overload needed for `plugin:<id>:<event>` namespaced events can't be narrowed to reject only known-stale names without breaking `Plugin.on()`'s internal implementation, so this is a runtime backstop, not a type fix. Diagnostic only — a listener on the renamed event still never fires, same as before.
85
+
86
+ ## [2.0.0-rc.22] — 2026-07-03
87
+
88
+ ### Added
89
+
90
+ - `controls?: boolean` on `BasePlayerConfig`. Renders the browser's native
91
+ media controls on the backing element (`<audio controls>` / `<video
92
+ controls>`) — useful when no UI plugin is loaded. Default `false`. Previously
93
+ declared only on video's own config type; now shared so both libraries in
94
+ the trio honor it identically. `nomercy-video-player` drops its duplicate
95
+ declaration (inherits this one) and `nomercy-music-player` now reads it too
96
+ — see their rc.22 changelogs. Additive, non-breaking.
97
+
98
+ ## [2.0.0-rc.21] — 2026-07-02
99
+
100
+ > This entry was corrected after publish to disclose the M1 change below — the original rc.21 release notes only covered the `baseUrl` fix. The published rc.21 tarball is unchanged; this is a documentation correction so the history is accurate.
101
+
102
+ ### Breaking
103
+
104
+ - `volume()`, `mute()`, `unmute()`, `subtitle()`, `audioTrack()`, `playbackRate()`, `repeatState()`, `shuffleState()`, and `dispose()` setters now return `Promise<void>` instead of `void`. Each dispatches its own dedicated `before*` hook (see Added) ahead of the mutation. Code that read state synchronously right after calling one of these must now `await` the call first. Callers that never inspected the return value are unaffected. `nomercy-video-player` and `nomercy-music-player` need a matching release to stay structurally compatible with `IPlayer` — see their rc.22 changelogs.
105
+
106
+ ### Added
107
+
108
+ - Ten cancellable `before*` hooks on `BaseEventMap`, the M1 Connect-plugin slice: `beforeVolume`, `beforeMute`, `beforeRepeat`, `beforeShuffle`, `beforePlaybackRate`, `beforeLanguage`, `beforeSubtitle`, `beforeAudioTrack`, `beforeDispose`, `beforeTransfer`. Each fires before its action applies; a listener may call `preventDefault()` to cancel (the matching `<action>Prevented` event fires instead) or hand `delay()` a promise the dispatch awaits before proceeding. `beforeVolume` and `beforePlaybackRate` fire unconditionally, independent of `setup({ mutationGuards })`, so a Connect plugin can rely on them without opting the whole player into the generic mutation-guard surface.
109
+
110
+ ### Fixed
111
+
112
+ - `baseUrl` now prepends to relative media paths as a raw string prefix, keeping its own path segment, the same way `baseImageUrl` already did. Previously media resolution used `new URL(path, baseUrl)`, which dropped the base path when the path started with a slash (the shape the media server sends), so `baseUrl` plus a root-relative item path resolved to a 404. Setting `baseUrl` and giving items relative paths now works as intended.
113
+
114
+ ## [2.0.0-rc.20] — 2026-07-02
115
+
116
+ ### Changed
117
+
118
+ - Backend layer de-duplicated. The hls.js `xhrSetup` Authorization closure (previously copy-pasted across every backend) is now `createAuthorizationXhrSetup` in core; the DOM play-state bridge (previously reimplemented per library and drifted) is now `bridgeBackendPlayState`; `destroyHlsInstance` is the single HLS teardown path. Internal only; no public export, signature, or event-shape change.
119
+
120
+ ## [2.0.0-rc.15] — 2026-06-29
121
+
122
+ ### Security
123
+
124
+ - `auth()` now returns a **redacted** frozen snapshot: `bearerToken` and
125
+ `accessToken` are stripped before the object leaves the player. The raw auth
126
+ config is only reachable via the internal `_rawAuth()` path used by the fetch
127
+ pipeline. Consumer code and custom URL resolvers receive the redacted view.
128
+ The encapsulation guarantee is proven by tests in `base-player-auth-lock.test.ts`.
129
+
130
+ ### Changed
131
+
132
+ - `setup()` now self-applies the `.nomercyplayer` CSS class to the container
133
+ element. Consumers no longer need to add `class="nomercyplayer"` manually,
134
+ though leaving it in place is harmless.
135
+
136
+ ### Added
137
+
138
+ - `describePlugin` conformance kit exported via the `./testing` subpath. Wraps
139
+ every plugin test with a fresh `StubPlayer` + plugin pair, automatic
140
+ teardown, and a zero-listener-leak assertion. See `TESTING.md` for the guide
141
+ and the worked example at
142
+ `src/__tests__/testing/consumer-plugin.example.test.ts`.
143
+ - `playbackRate` event added to `BaseEventMap`. Fires on every playback-rate
144
+ change with payload `{ rate: number }`.
145
+
146
+ ## [2.0.0-rc.14] — 2026-06-28
147
+
148
+ ### Security
149
+
150
+ - `auth()` and the URL-resolver context now redact bearer and access tokens
151
+ before the object is visible to consumer or plugin code. `_rawAuth()` is the
152
+ internal-only token path used by the fetch pipeline.
153
+
154
+ ### Changed
155
+
156
+ - `setup()` self-applies the `.nomercyplayer` CSS class to the container
157
+ element so consumers no longer need to add it manually.
158
+
159
+ ### Added
160
+
161
+ - `describePlugin` conformance kit exported via the `./testing` subpath, with a
162
+ consumer `TESTING.md` guide and a worked example.
163
+ - `playbackRate` event added to `BaseEventMap`, firing on every playback-rate
164
+ change with payload `{ rate: number }`.
165
+ - Mixin test coverage added.
166
+
167
+ ## [2.0.0-rc.13] — 2026-06-28
168
+
169
+ Version aligned with the player trio (no core code change).
170
+
171
+ ## [2.0.0-rc.12] — 2026-06-28
172
+
173
+ Version aligned with the player trio (no core code change).
174
+
175
+ ## [2.0.0-rc.11] — 2026-06-28
176
+
177
+ Version aligned with the player trio (no core code change).
178
+
179
+ ## [2.0.0-rc.10] — 2026-06-28
180
+
181
+ Version aligned with the player trio for the video autohide fix (no core code
182
+ change).
183
+
184
+ ## [2.0.0-rc.9] — 2026-06-28
185
+
186
+ ### Changed
187
+
188
+ - `hls.js` is now a real `dependency` of core. The HLS engine lives here;
189
+ `nomercy-music-player` and `nomercy-video-player` receive it transitively.
190
+
191
+ ## [2.0.0-rc.8] — 2026-06-28
192
+
193
+ ### Fixed
194
+
195
+ - The published ESM dist now carries explicit `.js` extensions on every
196
+ relative import via a `tsc-alias` post-build pass, making the package
197
+ importable by a raw Node ESM consumer.
198
+
199
+ ## [2.0.0-rc.7] — 2026-06-28
200
+
201
+ ### Fixed
202
+
203
+ - `KIT_VERSION` is inlined at build time instead of read from a JSON import,
204
+ so the package loads cleanly under Node ESM.
205
+ - `KIT_VERSION` is single-sourced from `package.json`; the semver prerelease
206
+ comparator is also corrected.
207
+
208
+ ## [2.0.0-rc.6] — 2026-06-28
209
+
210
+ ### Fixed
211
+
212
+ - Cast play/pause inversion corrected; equalizer-restore no-op resolved.
213
+ - `time()` setter is now guarded against out-of-range values.
214
+ - `playbackRate` is clamped to the `[0.25, 2]` range.
215
+
3
216
  ## [2.0.0-rc.5] — 2026-06-14
4
217
 
5
218
  ### Changed
package/CONTRIBUTING.md CHANGED
@@ -6,7 +6,7 @@ Thanks for your interest in `@nomercy-entertainment/nomercy-player-core`. This p
6
6
 
7
7
  - Bug? File a [GitHub issue](https://github.com/NoMercy-Entertainment/nomercy-player-core/issues) with a minimal reproduction. Include kit version, browser, and a stack trace if you have one.
8
8
  - Security? Do not file a public issue — see [SECURITY.md](./SECURITY.md).
9
- - Question? The full docs live at [docs.nomercy.tv/player/](https://docs.nomercy.tv/player/).
9
+ - Question? The full docs live at [docs.nomercy.tv/nomercy-player-core/](https://docs.nomercy.tv/nomercy-player-core/).
10
10
 
11
11
  ## Local development
12
12
 
@@ -14,7 +14,7 @@ Thanks for your interest in `@nomercy-entertainment/nomercy-player-core`. This p
14
14
  git clone https://github.com/NoMercy-Entertainment/nomercy-player-core.git
15
15
  cd nomercy-player-core
16
16
  npm install
17
- npm test # vitest run (1240 unit tests must pass)
17
+ npm test # vitest run
18
18
  npm run typecheck # tsc --noEmit
19
19
  npm run build # writes dist/
20
20
  ```
package/MIGRATION.md CHANGED
@@ -34,8 +34,8 @@ Covers all three packages: `nomercy-player-core`, `nomercy-video-player` (v2), a
34
34
 
35
35
  This guide covers kit-level changes: subpath imports, the five-layer architecture, and the 38 named adapter ports. For consumer-facing breaking changes (renamed methods, event payload shapes, playlist item fields), see the per-package migration guides:
36
36
 
37
- - **Video player:** [`packages/nomercy-video-player-v2/MIGRATION.md`](../nomercy-video-player-v2/MIGRATION.md)
38
- - **Music player:** [`packages/nomercy-music-player-v2/MIGRATION.md`](../nomercy-music-player-v2/MIGRATION.md)
37
+ - **Video player:** [nomercy-video-player MIGRATION.md](https://github.com/NoMercy-Entertainment/nomercy-video-player/blob/master/MIGRATION.md)
38
+ - **Music player:** [nomercy-music-player MIGRATION.md](https://github.com/NoMercy-Entertainment/nomercy-music-player/blob/master/MIGRATION.md)
39
39
 
40
40
  ---
41
41
 
@@ -44,7 +44,7 @@ This guide covers kit-level changes: subpath imports, the five-layer architectur
44
44
  Public API is stable. Import names did not change. If your code does:
45
45
 
46
46
  ```ts
47
- import { nmMPlayer, NMMusicPlayer } from '@nomercy-entertainment/nomercy-music-player';
47
+ import { NMMusicPlayer, nmplayer } from '@nomercy-entertainment/nomercy-music-player';
48
48
  import { IPlayer, LocalStorageBackend, Plugin } from '@nomercy-entertainment/nomercy-player-core';
49
49
  import { nmplayer, NMVideoPlayer } from '@nomercy-entertainment/nomercy-video-player';
50
50
  ```
@@ -89,13 +89,7 @@ Full subpath table:
89
89
  |---------|----------------|
90
90
  | `@nomercy-entertainment/nomercy-player-core/adapters/storage` | `IStorage`, `LocalStorageBackend`, `MemoryStorageBackend`, `IndexedDBBackend` |
91
91
  | `@nomercy-entertainment/nomercy-player-core/adapters/stream` | `IStreamSource`, `IStreamRegistry`, `StreamRegistry` |
92
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform` | `IPlatform`, `browserPlatform` |
93
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/wake-lock` | `IWakeLock` |
94
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/network` | `INetworkMonitor` |
95
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/visibility` | `IVisibilityMonitor` |
96
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/capabilities` | `ICapabilitiesProbe` |
97
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/fullscreen` | `IFullscreenController` |
98
- | `@nomercy-entertainment/nomercy-player-core/adapters/platform/pip` | `IPipController` |
92
+ | `@nomercy-entertainment/nomercy-player-core/adapters/platform` | `IPlatform`, `browserPlatform`, `IWakeLock`, `INetworkMonitor`, `IVisibilityMonitor`, `ICapabilitiesProbe`, `IFullscreenController`, `IPipController` |
99
93
  | `@nomercy-entertainment/nomercy-player-core/adapters/realtime` | `IRealtimeChannel`, `nativeWebSocketAdapter` |
100
94
  | `@nomercy-entertainment/nomercy-player-core/adapters/translator` | `ITranslator`, `DefaultTranslator`, `createNetworkTranslationLoader`, `translationsFromGlob` |
101
95
  | `@nomercy-entertainment/nomercy-player-core/adapters/language-matcher` | `ILanguageMatcher`, `bcp47FallbackChain` |
@@ -107,7 +101,7 @@ Full subpath table:
107
101
  | `@nomercy-entertainment/nomercy-player-core/adapters/event-bus` | `IEventBus`, `EventEmitter` |
108
102
  | `@nomercy-entertainment/nomercy-player-core/adapters/media-list` | `IMediaList`, `MediaList` |
109
103
  | `@nomercy-entertainment/nomercy-player-core/adapters/lifecycle-registry` | `ILifecycleRegistry`, `LifecycleRegistry` |
110
- | `@nomercy-entertainment/nomercy-player-core/adapters/fetch` | `IFetch`, `authFetch` |
104
+ | `@nomercy-entertainment/nomercy-player-core/adapters/fetch` | `IFetch`, `defaultFetch` |
111
105
  | `@nomercy-entertainment/nomercy-player-core/adapters/clock` | `IClock` |
112
106
  | `@nomercy-entertainment/nomercy-player-core/adapters/id-generator` | `IIdGenerator` |
113
107
  | `@nomercy-entertainment/nomercy-player-core/adapters/element-factory` | `createElement`, `createButton`, `createSVG`, `addClasses`, `removeClasses`, `AddClasses`, `AppendTo`, `CreateElement` |
@@ -124,8 +118,8 @@ Full subpath table:
124
118
  | `@nomercy-entertainment/nomercy-player-core/plugins/spectrum` | `SpectrumPlugin`, `spectrumPlugin` |
125
119
  | `@nomercy-entertainment/nomercy-player-core/plugins/tab-leader` | `TabLeaderPlugin`, `tabLeaderPlugin` |
126
120
  | `@nomercy-entertainment/nomercy-player-core/plugins/visualization` | `VisualizationPlugin` |
127
- | `@nomercy-entertainment/nomercy-player-core/cues/parsers/vtt` | `parseVtt`, `parseVttSprite`, `parseVttSubtitles` |
128
- | `@nomercy-entertainment/nomercy-player-core/cues/parsers/lrc` | `parseLrc` |
121
+ | `@nomercy-entertainment/nomercy-player-core/adapters/cue-parser/vtt` | `parseVtt`, `parseVttSprite`, `parseVttSubtitles` |
122
+ | `@nomercy-entertainment/nomercy-player-core/adapters/cue-parser/lrc` | `parseLrc` |
129
123
  | `@nomercy-entertainment/nomercy-player-core/streams/hls` | HLS stream source |
130
124
  | `@nomercy-entertainment/nomercy-player-core/streams/native` | Native stream source |
131
125
  | `@nomercy-entertainment/nomercy-player-core/testing` | Test helpers and mock adapters |
@@ -135,7 +129,7 @@ Full subpath table:
135
129
 
136
130
  ## Removed APIs
137
131
 
138
- No APIs were removed. Every named export present in the v1 packages continues to resolve in v2. The goal of the 12-wave restructure was zero consumer breakage.
132
+ Core removed nothing: every kit-level export present in v1 continues to resolve in v2. The music package did remove two ports (`ILyricSource`/`LrcFileSource` and `INowPlayingArt`/`MediaSessionArtProvider`); the lyrics and media-session plugins own that work now. The music player's MIGRATION.md documents the replacement paths.
139
133
 
140
134
  ---
141
135
 
@@ -156,16 +150,13 @@ The 38 named ports are the primary extension surface. Each port is an interface
156
150
  | `IRetryPolicy` | Network retry timing and max-attempts |
157
151
  | `IClock` | Monotonic time source — swap for a server-synced clock in group-sync scenarios |
158
152
  | `IUrlResolver` | URL rewriting — CDN signing, auth params, proxy routing |
159
- | `IAudioBackend` (music-v2) | Audio element behaviour — web-audio or html5-audio, or a custom WS-backed backend |
160
- | `IPlaylistGenerator` (music-v2) | Queue ordering — linear, tag-aware shuffle, or server-driven |
161
- | `ISimilarityEngine` (music-v2) | "More like this" playlist extension — consumer-required, server-specific |
162
- | `IScrobbler` (music-v2) | Playback reporting — Last.fm, ListenBrainz, or custom |
163
- | `ILyricSource` (music-v2) | Lyric data delivery — LRC file, server API, or embedded metadata |
164
- | `INowPlayingArt` (music-v2) | Album art resolution — Media Session, server API, or local cache |
165
- | `IVideoBackend` (video-v2) | Video element behaviour — Html5VideoBackend or a custom MSE/WebCodecs backend |
166
- | `IThumbnailSource` (video-v2) | Seek thumbnail frames — VTT sprite or a server-generated endpoint |
167
- | `IChapterSource` (video-v2) | Chapter markers — VTT file or a server metadata endpoint |
168
- | `ISubtitleStyleStore` (video-v2) | Subtitle style persistence — storage-backed or custom |
153
+ | `IAudioBackend` (music, `./adapters/audio-backend`) | Audio element behaviour — web-audio or html5-audio, or a custom WS-backed backend |
154
+ | `IPlaylistGenerator` (music, `./plugins/auto-advance`) | Queue ordering — linear, tag-aware shuffle, or server-driven |
155
+ | `IScrobbler` (music, `./plugins/scrobble`) | Playback reporting — Last.fm, ListenBrainz, or custom |
156
+ | `IVideoBackend` (video) | Video element behaviour — Html5VideoBackend or a custom MSE/WebCodecs backend |
157
+ | `IThumbnailSource` (video) | Seek thumbnail frames — VTT sprite or a server-generated endpoint |
158
+ | `IChapterSource` (video) | Chapter markers — VTT file or a server metadata endpoint |
159
+ | `ISubtitleStyleStore` (video) | Subtitle style persistence — storage-backed or custom |
169
160
 
170
161
  ---
171
162
 
package/README.md CHANGED
@@ -6,9 +6,23 @@ Full documentation: https://docs.nomercy.tv/nomercy-player-core/
6
6
 
7
7
  # nomercy-player-core
8
8
 
9
- The shared, headless engine that the video and music players are built on. It carries everything that is not specific to video or audio: the queue, the auth pipeline, the plugin system, the typed event bus, i18n, storage, and an adapter port for every cross-cutting concern. Swapping a default is a matter of passing a different implementation to `setup()`, no subclassing.
9
+ The shared, headless engine that the video and music players are built on.
10
10
 
11
- You rarely install this package directly. Pull in [`nomercy-video-player`](https://www.npmjs.com/package/@nomercy-entertainment/nomercy-video-player) or [`nomercy-music-player`](https://www.npmjs.com/package/@nomercy-entertainment/nomercy-music-player) and the core is installed automatically as a hard dependency. Install it on its own only when you are writing a library-level plugin or a new player package on top of the core.
11
+ It carries everything that is not specific to video or audio: the queue, auth, the plugin system, the typed event bus, i18n, and storage.
12
+
13
+ **You stay in charge.**
14
+
15
+ Nothing renders a UI on its own. Nothing is forced on you.
16
+
17
+ - **Everything is opt-in.** No plugin runs until you `addPlugin` it. The engine ships quiet, you add only what you want.
18
+ - **Swap any behavior through adapters.** The clock, fetch, storage, logger, retry policy, shuffle, URL resolver, stream registry, and more are each an interface with a default. Pass your own to `setup()`. No subclassing.
19
+ - **Plain events and methods.** The engine reports through a typed event bus. How you react, and what you build, is yours.
20
+
21
+ You rarely install this package directly.
22
+
23
+ Pull in [`nomercy-video-player`](https://www.npmjs.com/package/@nomercy-entertainment/nomercy-video-player) or [`nomercy-music-player`](https://www.npmjs.com/package/@nomercy-entertainment/nomercy-music-player) and the core comes with it.
24
+
25
+ Install it on its own only when you are writing a plugin or building a new player package on the core.
12
26
 
13
27
  ```
14
28
  npm install @nomercy-entertainment/nomercy-player-core
@@ -16,38 +30,82 @@ npm install @nomercy-entertainment/nomercy-player-core
16
30
 
17
31
  ## Quick start
18
32
 
19
- You drive the core through a library. The core's adapters and plugins are configured in the same `setup()` call:
33
+ The core is the player engine. Compose its method mixins onto a class and you have a working player: the queue, transport, loading pipeline, time and volume, the typed event bus, auth, and the plugin system are all there. A library on top of the core adds only the medium-specific piece, the backend that turns a source into sound or picture.
34
+
35
+ ```ts
36
+ import {
37
+ composeMixins,
38
+ initPlayerCoreState,
39
+ lifecycleMethods,
40
+ playerCoreMethods,
41
+ queueMethods,
42
+ timeMethods,
43
+ transportMethods,
44
+ volumeMethods,
45
+ } from '@nomercy-entertainment/nomercy-player-core';
46
+
47
+ class MyPlayer {
48
+ constructor(id: string) {
49
+ initPlayerCoreState(this, { className: 'MyPlayer' });
50
+ this.setup({ playlist: [{ id, url: '...' }] });
51
+ }
52
+ }
53
+
54
+ composeMixins(
55
+ MyPlayer.prototype,
56
+ playerCoreMethods,
57
+ lifecycleMethods,
58
+ queueMethods,
59
+ transportMethods,
60
+ timeMethods,
61
+ volumeMethods,
62
+ );
63
+
64
+ const player = new MyPlayer('intro');
65
+ player.on('ready', () => player.play());
66
+ player.queue();
67
+ player.time(30);
68
+ ```
69
+
70
+ That player drives the full core surface. The only thing it does not do on its own is render a medium, which is what `nomercy-video-player` and `nomercy-music-player` add. Reach for the core directly when you are building a new player package like those, not when you just want to play video or audio.
71
+
72
+ Two extension points put you in control of the rest. **Adapters** replace any cross-cutting concern through `setup()`, no subclassing. Override only what you want; everything else keeps its default:
20
73
 
21
74
  ```ts
22
- import { nmVideoPlayer } from '@nomercy-entertainment/nomercy-video-player';
23
75
  import { LocalStorageBackend } from '@nomercy-entertainment/nomercy-player-core';
24
76
 
25
- const player = nmVideoPlayer('player')
26
- .setup({
27
- baseUrl: 'https://raw.githubusercontent.com/NoMercy-Entertainment/nomercy-media/master/Films',
28
- storage: new LocalStorageBackend(),
29
- playlist: [
30
- {
31
- id: 'sintel',
32
- title: 'Sintel',
33
- url: '/Sintel.(2010)/Sintel.(2010).NoMercy.m3u8',
34
- duration: 888,
35
- },
36
- ],
37
- });
38
-
39
- player.on('ready', () => {
40
- player.item(0, { autoplay: true });
77
+ player.setup({
78
+ storage: new LocalStorageBackend(), // or your own IStorage
79
+ logger: myLogger, // your own ILogger
80
+ shuffleStrategy: myShuffle, // your own IShuffleStrategy
81
+ urlResolver: mySignedUrls, // your own IUrlResolver
41
82
  });
42
83
  ```
43
84
 
85
+ **Plugins** are opt-in and ride the same typed event bus. Nothing registers itself; you add what you want. A plugin reads through `this.on`, emits its own events, and needs no manual teardown, the base disposes every `this.on` subscription and mounted element for it:
86
+
87
+ ```ts
88
+ import { Plugin } from '@nomercy-entertainment/nomercy-player-core';
89
+
90
+ export class PlayCountPlugin extends Plugin {
91
+ static override readonly id = 'play-count';
92
+
93
+ override use(): void {
94
+ this.on('play', () => this.emit('play-count:changed', undefined));
95
+ }
96
+ }
97
+
98
+ player.addPlugin(PlayCountPlugin);
99
+ ```
100
+
44
101
  ## Documentation
45
102
 
46
- The [docs site](https://docs.nomercy.tv/nomercy-player-core/) is the full reference and the home for everything that used to live in the wiki:
103
+ The [docs site](https://docs.nomercy.tv/nomercy-player-core/) is the full reference, ordered from first player to plugin author:
47
104
 
48
- - [Quick Start](https://docs.nomercy.tv/nomercy-player-core/quickstart) and the [adapter ports](https://docs.nomercy.tv/nomercy-player-core/adapters)
49
- - [Event system](https://docs.nomercy.tv/nomercy-player-core/event-system), [lifecycle](https://docs.nomercy.tv/nomercy-player-core/lifecycle), and [auth and fetch](https://docs.nomercy.tv/nomercy-player-core/auth-fetch)
50
- - [Built-in plugins](https://docs.nomercy.tv/nomercy-player-core/plugins), [plugin authoring](https://docs.nomercy.tv/nomercy-player-core/plugin-authoring), and the full type reference
105
+ - [Introduction](https://docs.nomercy.tv/nomercy-player-core/introduction) and [Quick Start](https://docs.nomercy.tv/nomercy-player-core/quickstart), composing the core into a player
106
+ - The Guided Tour over the [lifecycle](https://docs.nomercy.tv/nomercy-player-core/tour/lifecycle), the [event bus](https://docs.nomercy.tv/nomercy-player-core/tour/event-bus), the [adapter ports](https://docs.nomercy.tv/nomercy-player-core/tour/adapters), and the [plugin base](https://docs.nomercy.tv/nomercy-player-core/tour/plugin-base)
107
+ - [Build a Player](https://docs.nomercy.tv/nomercy-player-core/build/compose-methods) and [Recipe: use authFetch](https://docs.nomercy.tv/nomercy-player-core/recipes/auth-fetch)
108
+ - The full [type reference](https://docs.nomercy.tv/nomercy-player-core/reference/composition) and [Testing your plugins](./TESTING.md) with the `describePlugin` conformance helper the kit ships
51
109
 
52
110
  ## License
53
111
 
package/RELEASING.md CHANGED
@@ -1,47 +1,60 @@
1
1
  # Releasing @nomercy-entertainment/nomercy-player-core
2
2
 
3
- ## Beta publish (current)
3
+ This file is the release runbook for the whole player trio. The video and music
4
+ RELEASING.md files cover only their package-specific steps and point back here for
5
+ the shared choreography.
4
6
 
5
- All three packages in the trio publish under the `beta` dist-tag. This is controlled by
6
- `publishConfig.tag: "beta"` in each `package.json`. A consumer gets the beta by running:
7
+ ## RC publish (current)
8
+
9
+ All three packages in the trio publish under the `rc` dist-tag. This is controlled by
10
+ `publishConfig.tag: "rc"` in each `package.json`. A consumer gets the release candidate
11
+ by running:
7
12
 
8
13
  ```
9
- npm install @nomercy-entertainment/nomercy-player-core@beta
14
+ npm install @nomercy-entertainment/nomercy-player-core@rc
10
15
  ```
11
16
 
12
- A plain `npm install @nomercy-entertainment/nomercy-player-core` resolves nothing until a
13
- stable version is published under the `latest` tag.
17
+ Watch out: a plain `npm install` without the tag does not fail. For this package it
18
+ resolves `2.0.0-rc.2`, which was published to `latest` before `publishConfig.tag` existed.
19
+ For video and music it resolves their old v1 line. Publishing `2.0.0` to `latest`
20
+ heals all of this; until then, always install with an explicit tag or version.
14
21
 
15
22
  ## Stable 2.0.0 flip checklist
16
23
 
17
- When the beta period ends and 2.0.0 is ready for general availability:
18
-
19
- 1. Bump version to `2.0.0` in all three package.json files (`nomercy-player-core`,
20
- `nomercy-video-player`, `nomercy-music-player`).
21
- 2. Remove `"tag": "beta"` from `publishConfig` in all three, OR publish with
22
- `npm publish --tag latest`. Leaving `tag: "beta"` without the override means
23
- `npm install <pkg>` still resolves nothing under `latest`.
24
- 3. Update the `@nomercy-entertainment/nomercy-player-core` dependency range in
25
- `nomercy-video-player` and `nomercy-music-player` from `^2.0.0-beta.0` to `^2.0.0`
26
- (both satisfy the same constraint, but `^2.0.0` is the conventional stable form).
27
- 4. Tag each repo: `git tag v2.0.0 && git push origin v2.0.0`.
28
- 5. Publish in dependency order: core first, then video and music.
24
+ Publish order matters: video and music build against the published core (their build
25
+ scripts run from `node_modules/@nomercy-entertainment/nomercy-player-core/scripts`),
26
+ so core goes first and the consumers refresh their lockfiles before they publish.
27
+
28
+ 1. Preflight every package: `npm run typecheck`, `npm run lint`, `npm test`, and
29
+ `npm run build:all` (plain `build` for core) must be green. Pack each package with
30
+ `npm pack` and import every subpath export from the tarball with raw Node.
31
+ 2. Bump the version to `2.0.0` in all three `package.json` files.
32
+ 3. Remove `"tag": "rc"` from `publishConfig` in all three. Leaving it in place while
33
+ publishing without `--tag latest` keeps stable installs broken.
34
+ 4. Update the `@nomercy-entertainment/nomercy-player-core` range in video and music
35
+ to `^2.0.0`. The rc range already matches stable, so this is convention, not mechanics.
36
+ 5. Add a `[2.0.0]` entry to each CHANGELOG.md summarizing the road from the last rc.
37
+ 6. Publish `@nomercy-entertainment/eslint-plugin-player` (first publish of the standalone
38
+ rules package), then switch the eslint.config.js import in all three packages to it as
39
+ a devDependency. Core stopped shipping its embedded `./eslint-plugin` export; video and
40
+ music still import that subpath from the older published core, which breaks the moment
41
+ they bump to the stable core, so this switch lands in the same pass as the version bump.
42
+ 7. Publish core. Then in video and music run `npm update @nomercy-entertainment/nomercy-player-core`
43
+ so their lockfiles and build scripts pick up the stable core, and publish both.
44
+ 8. Tag each repo: `git tag v2.0.0 && git push origin v2.0.0`.
45
+ 9. Flip the docs-site quickstart install commands from `@rc` to the bare package name
46
+ (nomercy-player-core, nomercy-video-player, and nomercy-music-player quickstart pages).
47
+ 10. Verify from the outside: `npm view` shows `latest: 2.0.0` for all three, a fresh
48
+ `npm install` of each package imports cleanly, and the CDN bundle
49
+ (`dist/*.iife.js`) is present in the published tarball.
29
50
 
30
51
  ## Cross-package version range
31
52
 
32
- During beta, video and music declare:
33
-
34
- ```json
35
- {
36
- "dependencies": {
37
- "@nomercy-entertainment/nomercy-player-core": "^2.0.0-beta.0"
38
- }
39
- }
40
- ```
41
-
42
- `^2.0.0-beta.0` matches `>=2.0.0-beta.0 <3.0.0-0`, which covers every `2.0.0-beta.x`
43
- prerelease AND the eventual `2.0.0` stable — so no range change is required at stable flip
44
- (step 3 above is cosmetic/conventional, not mechanical).
53
+ During the rc phase, video and music declare a caret range on a prerelease of this
54
+ package (currently `^2.0.0-rc.24`). That range matches every later rc and the eventual
55
+ `2.0.0` stable, so the flip needs no range change to keep resolving; step 4 above is
56
+ about convention only.
45
57
 
46
- In the yarn classic workspace the range resolves to the local `packages/nomercy-player-core`
47
- workspace package regardless, so local development is unaffected.
58
+ There is no npm or yarn workspace in the monorepo root. The testbed consumes all three
59
+ packages through `file:` links, and video and music consume the published core from the
60
+ registry, in the monorepo exactly as in CI.
@@ -54,7 +54,7 @@ export function parseLrc(text) {
54
54
  });
55
55
  }
56
56
  }
57
- rawCues.sort((a, b) => a.start - b.start);
57
+ rawCues.sort((itemA, itemB) => itemA.start - itemB.start);
58
58
  const cues = rawCues.map((cue, idx) => {
59
59
  const nextStart = rawCues[idx + 1]?.start;
60
60
  const end = nextStart !== undefined ? nextStart : cue.start + DEFAULT_TRAILING_DURATION;
@@ -98,7 +98,9 @@ function parseBodyForWords(body) {
98
98
  else if (trailing) {
99
99
  plainText += trailing;
100
100
  }
101
- const source = words.length > 0 ? words.map(word => word.text).join(' ') : plainText;
101
+ const source = words.length > 0
102
+ ? [plainText.trim(), ...words.map(word => word.text)].filter(Boolean).join(' ')
103
+ : plainText;
102
104
  const text = source.trim();
103
105
  return words.length > 0
104
106
  ? {
@@ -1 +1 @@
1
- {"version":3,"file":"lrc.js","sourceRoot":"","sources":["../../../src/adapters/cue-parser/lrc.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,uCAAuC;AACvC,EAAE;AACF,4EAA4E;AAC5E,EAAE;AACF,uCAAuC;AACvC,gFAAgF;AAGhF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAiBpD,MAAM,YAAY,GAAG,wCAAwC,CAAC;AAC9D,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAC/C,MAAM,iBAAiB,GAAG,sCAAsC,CAAC;AAEjE,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACpC,IAAI,CAAC,IAAI;QACR,OAAO,aAAa,CAAa,EAAE,CAAC,CAAC;IAEtC,MAAM,OAAO,GAA6C,EAAE,CAAC;IAE7D,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO;YACX,SAAS;QAEV,8EAA8E;QAC9E,IAAI,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;YAChC,SAAS;QAEV,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC;QAC3B,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,KACC,IAAI,KAAK,GAAG,YAAY,CAAC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