@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.
- package/CHANGELOG.md +213 -0
- package/CONTRIBUTING.md +2 -2
- package/MIGRATION.md +15 -24
- package/README.md +82 -24
- package/RELEASING.md +46 -33
- package/dist/adapters/cue-parser/lrc.js +4 -2
- package/dist/adapters/cue-parser/lrc.js.map +1 -1
- package/dist/adapters/cue-parser/timestamp.d.ts +36 -0
- package/dist/adapters/cue-parser/timestamp.d.ts.map +1 -0
- package/dist/adapters/cue-parser/timestamp.js +68 -0
- package/dist/adapters/cue-parser/timestamp.js.map +1 -0
- package/dist/adapters/cue-parser/vtt.d.ts.map +1 -1
- package/dist/adapters/cue-parser/vtt.js +11 -29
- package/dist/adapters/cue-parser/vtt.js.map +1 -1
- package/dist/adapters/element-factory/dom.d.ts +1 -1
- package/dist/adapters/element-factory/dom.d.ts.map +1 -1
- package/dist/adapters/element-factory/dom.js.map +1 -1
- package/dist/adapters/event-bus/default.d.ts.map +1 -1
- package/dist/adapters/event-bus/default.js +23 -0
- package/dist/adapters/event-bus/default.js.map +1 -1
- package/dist/adapters/lifecycle-registry/default.d.ts.map +1 -1
- package/dist/adapters/lifecycle-registry/default.js +8 -6
- package/dist/adapters/lifecycle-registry/default.js.map +1 -1
- package/dist/adapters/logger/ILogger.d.ts +0 -2
- package/dist/adapters/logger/ILogger.d.ts.map +1 -1
- package/dist/adapters/logger/default.d.ts.map +1 -1
- package/dist/adapters/logger/default.js +1 -10
- package/dist/adapters/logger/default.js.map +1 -1
- package/dist/adapters/media-element/MediaElementBackend.d.ts +155 -0
- package/dist/adapters/media-element/MediaElementBackend.d.ts.map +1 -0
- package/dist/adapters/media-element/MediaElementBackend.js +210 -0
- package/dist/adapters/media-element/MediaElementBackend.js.map +1 -0
- package/dist/adapters/media-element/backend-lifecycle-bridge.d.ts +71 -0
- package/dist/adapters/media-element/backend-lifecycle-bridge.d.ts.map +1 -0
- package/dist/adapters/media-element/backend-lifecycle-bridge.js +49 -0
- package/dist/adapters/media-element/backend-lifecycle-bridge.js.map +1 -0
- package/dist/adapters/media-element/backend-state.d.ts +17 -0
- package/dist/adapters/media-element/backend-state.d.ts.map +1 -0
- package/dist/adapters/media-element/backend-state.js +20 -0
- package/dist/adapters/media-element/backend-state.js.map +1 -0
- package/dist/adapters/media-element/helpers.d.ts +161 -0
- package/dist/adapters/media-element/helpers.d.ts.map +1 -0
- package/dist/adapters/media-element/helpers.js +345 -0
- package/dist/adapters/media-element/helpers.js.map +1 -0
- package/dist/adapters/media-element/index.d.ts +9 -0
- package/dist/adapters/media-element/index.d.ts.map +1 -0
- package/dist/adapters/media-element/index.js +12 -0
- package/dist/adapters/media-element/index.js.map +1 -0
- package/dist/adapters/media-list/IMediaList.d.ts +2 -2
- package/dist/adapters/media-list/IMediaList.d.ts.map +1 -1
- package/dist/adapters/media-list/IMediaList.js +1 -1
- package/dist/adapters/media-list/IMediaList.js.map +1 -1
- package/dist/adapters/media-list/default.d.ts +3 -3
- package/dist/adapters/media-list/default.d.ts.map +1 -1
- package/dist/adapters/media-list/default.js +2 -2
- package/dist/adapters/media-list/default.js.map +1 -1
- package/dist/adapters/platform/browser.d.ts.map +1 -1
- package/dist/adapters/platform/browser.js +7 -2
- package/dist/adapters/platform/browser.js.map +1 -1
- package/dist/adapters/realtime/IRealtimeChannel.d.ts +1 -1
- package/dist/adapters/realtime/websocket.js +5 -5
- package/dist/adapters/realtime/websocket.js.map +1 -1
- package/dist/adapters/storage/local-storage.d.ts +6 -1
- package/dist/adapters/storage/local-storage.d.ts.map +1 -1
- package/dist/adapters/storage/local-storage.js +8 -2
- package/dist/adapters/storage/local-storage.js.map +1 -1
- package/dist/adapters/stream/hls.d.ts.map +1 -1
- package/dist/adapters/stream/hls.js +7 -6
- package/dist/adapters/stream/hls.js.map +1 -1
- package/dist/adapters/stream/native.js +2 -2
- package/dist/adapters/stream/native.js.map +1 -1
- package/dist/adapters/stream/registry.js +5 -5
- package/dist/adapters/stream/registry.js.map +1 -1
- package/dist/adapters/translator/loaders/translations-glob.d.ts +1 -1
- package/dist/adapters/translator/loaders/translations-glob.d.ts.map +1 -1
- package/dist/adapters/translator/loaders/translations-glob.js +6 -5
- package/dist/adapters/translator/loaders/translations-glob.js.map +1 -1
- package/dist/adapters/translator/translator.js +3 -3
- package/dist/adapters/translator/translator.js.map +1 -1
- package/dist/base-player.d.ts +1 -1
- package/dist/base-player.d.ts.map +1 -1
- package/dist/base-player.js +1 -0
- package/dist/base-player.js.map +1 -1
- package/dist/core/append-auth-token-param.d.ts.map +1 -1
- package/dist/core/append-auth-token-param.js +5 -2
- package/dist/core/append-auth-token-param.js.map +1 -1
- package/dist/core/auth-fetch/decode.js +2 -2
- package/dist/core/auth-fetch/decode.js.map +1 -1
- package/dist/core/auth-fetch/orchestrator.d.ts.map +1 -1
- package/dist/core/auth-fetch/orchestrator.js +7 -1
- package/dist/core/auth-fetch/orchestrator.js.map +1 -1
- package/dist/core/auth-fetch/prepare.d.ts +1 -1
- package/dist/core/auth-fetch/prepare.js +2 -2
- package/dist/core/auth-fetch/prepare.js.map +1 -1
- package/dist/core/chapters/fill-gaps.d.ts +53 -0
- package/dist/core/chapters/fill-gaps.d.ts.map +1 -0
- package/dist/core/chapters/fill-gaps.js +126 -0
- package/dist/core/chapters/fill-gaps.js.map +1 -0
- package/dist/core/config-merge.js +1 -1
- package/dist/core/config-merge.js.map +1 -1
- package/dist/core/cues/cue.js +3 -3
- package/dist/core/cues/cue.js.map +1 -1
- package/dist/core/cues/tracker.d.ts +1 -1
- package/dist/core/cues/tracker.d.ts.map +1 -1
- package/dist/core/cues/tracker.js +2 -2
- package/dist/core/cues/tracker.js.map +1 -1
- package/dist/core/dispatch.d.ts.map +1 -1
- package/dist/core/dispatch.js +6 -3
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/format.d.ts +47 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +84 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/index.d.ts +32 -15
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/kit-version.js +1 -1
- package/dist/core/mixins/abr.d.ts +5 -2
- package/dist/core/mixins/abr.d.ts.map +1 -1
- package/dist/core/mixins/abr.js +9 -3
- package/dist/core/mixins/abr.js.map +1 -1
- package/dist/core/mixins/activity.d.ts +39 -0
- package/dist/core/mixins/activity.d.ts.map +1 -0
- package/dist/core/mixins/activity.js +144 -0
- package/dist/core/mixins/activity.js.map +1 -0
- package/dist/core/mixins/audio-output.d.ts.map +1 -1
- package/dist/core/mixins/audio-output.js +6 -5
- package/dist/core/mixins/audio-output.js.map +1 -1
- package/dist/core/mixins/auth.d.ts +12 -2
- package/dist/core/mixins/auth.d.ts.map +1 -1
- package/dist/core/mixins/auth.js +38 -13
- package/dist/core/mixins/auth.js.map +1 -1
- package/dist/core/mixins/cast.d.ts +5 -0
- package/dist/core/mixins/cast.d.ts.map +1 -1
- package/dist/core/mixins/cast.js +22 -5
- package/dist/core/mixins/cast.js.map +1 -1
- package/dist/core/mixins/container-class-emit.d.ts +16 -5
- package/dist/core/mixins/container-class-emit.d.ts.map +1 -1
- package/dist/core/mixins/container-class-emit.js +31 -14
- package/dist/core/mixins/container-class-emit.js.map +1 -1
- package/dist/core/mixins/dom-mixin.d.ts +1 -1
- package/dist/core/mixins/dom-mixin.d.ts.map +1 -1
- package/dist/core/mixins/dom-mixin.js.map +1 -1
- package/dist/core/mixins/experimental.d.ts.map +1 -1
- package/dist/core/mixins/experimental.js +2 -0
- package/dist/core/mixins/experimental.js.map +1 -1
- package/dist/core/mixins/i18n.d.ts +19 -4
- package/dist/core/mixins/i18n.d.ts.map +1 -1
- package/dist/core/mixins/i18n.js +35 -13
- package/dist/core/mixins/i18n.js.map +1 -1
- package/dist/core/mixins/lifecycle.d.ts +27 -9
- package/dist/core/mixins/lifecycle.d.ts.map +1 -1
- package/dist/core/mixins/lifecycle.js +187 -44
- package/dist/core/mixins/lifecycle.js.map +1 -1
- package/dist/core/mixins/loading.d.ts +8 -0
- package/dist/core/mixins/loading.d.ts.map +1 -1
- package/dist/core/mixins/loading.js +63 -5
- package/dist/core/mixins/loading.js.map +1 -1
- package/dist/core/mixins/media-tracks.d.ts +79 -17
- package/dist/core/mixins/media-tracks.d.ts.map +1 -1
- package/dist/core/mixins/media-tracks.js +364 -127
- package/dist/core/mixins/media-tracks.js.map +1 -1
- package/dist/core/mixins/player-state.d.ts +2 -2
- package/dist/core/mixins/player-state.d.ts.map +1 -1
- package/dist/core/mixins/plugin-registration.d.ts +31 -0
- package/dist/core/mixins/plugin-registration.d.ts.map +1 -1
- package/dist/core/mixins/plugin-registration.js +184 -92
- package/dist/core/mixins/plugin-registration.js.map +1 -1
- package/dist/core/mixins/queue.d.ts +13 -1
- package/dist/core/mixins/queue.d.ts.map +1 -1
- package/dist/core/mixins/queue.js +24 -4
- package/dist/core/mixins/queue.js.map +1 -1
- package/dist/core/mixins/sidecar-util.d.ts +18 -1
- package/dist/core/mixins/sidecar-util.d.ts.map +1 -1
- package/dist/core/mixins/sidecar-util.js +9 -0
- package/dist/core/mixins/sidecar-util.js.map +1 -1
- package/dist/core/mixins/state-mutators.d.ts +39 -47
- package/dist/core/mixins/state-mutators.d.ts.map +1 -1
- package/dist/core/mixins/state-mutators.js +61 -42
- package/dist/core/mixins/state-mutators.js.map +1 -1
- package/dist/core/mixins/time.d.ts +37 -4
- package/dist/core/mixins/time.d.ts.map +1 -1
- package/dist/core/mixins/time.js +83 -16
- package/dist/core/mixins/time.js.map +1 -1
- package/dist/core/mixins/transport.d.ts +2 -24
- package/dist/core/mixins/transport.d.ts.map +1 -1
- package/dist/core/mixins/transport.js +5 -13
- package/dist/core/mixins/transport.js.map +1 -1
- package/dist/core/mixins/volume.d.ts +50 -30
- package/dist/core/mixins/volume.d.ts.map +1 -1
- package/dist/core/mixins/volume.js +109 -43
- package/dist/core/mixins/volume.js.map +1 -1
- package/dist/core/plugin/base.d.ts +2 -2
- package/dist/core/plugin/base.d.ts.map +1 -1
- package/dist/core/plugin/base.js +6 -2
- package/dist/core/plugin/base.js.map +1 -1
- package/dist/core/plugin/fetch.d.ts +1 -1
- package/dist/core/plugin/fetch.d.ts.map +1 -1
- package/dist/core/plugin/fetch.js +4 -3
- package/dist/core/plugin/fetch.js.map +1 -1
- package/dist/core/plugin-translations.d.ts +28 -0
- package/dist/core/plugin-translations.d.ts.map +1 -0
- package/dist/core/plugin-translations.js +78 -0
- package/dist/core/plugin-translations.js.map +1 -0
- package/dist/core/state.d.ts +45 -19
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +11 -5
- package/dist/core/state.js.map +1 -1
- package/dist/core/title-tokens.d.ts +27 -0
- package/dist/core/title-tokens.d.ts.map +1 -0
- package/dist/core/title-tokens.js +41 -0
- package/dist/core/title-tokens.js.map +1 -0
- package/dist/core/volume-curve.d.ts +23 -18
- package/dist/core/volume-curve.d.ts.map +1 -1
- package/dist/core/volume-curve.js +23 -21
- package/dist/core/volume-curve.js.map +1 -1
- package/dist/i18n/af.d.ts +17 -0
- package/dist/i18n/af.d.ts.map +1 -0
- package/dist/i18n/af.js +64 -0
- package/dist/i18n/af.js.map +1 -0
- package/dist/i18n/ar.d.ts +17 -0
- package/dist/i18n/ar.d.ts.map +1 -0
- package/dist/i18n/ar.js +64 -0
- package/dist/i18n/ar.js.map +1 -0
- package/dist/i18n/bg.d.ts +17 -0
- package/dist/i18n/bg.d.ts.map +1 -0
- package/dist/i18n/bg.js +64 -0
- package/dist/i18n/bg.js.map +1 -0
- package/dist/i18n/bn.d.ts +17 -0
- package/dist/i18n/bn.d.ts.map +1 -0
- package/dist/i18n/bn.js +64 -0
- package/dist/i18n/bn.js.map +1 -0
- package/dist/i18n/ca.d.ts +17 -0
- package/dist/i18n/ca.d.ts.map +1 -0
- package/dist/i18n/ca.js +64 -0
- package/dist/i18n/ca.js.map +1 -0
- package/dist/i18n/cs.d.ts +17 -0
- package/dist/i18n/cs.d.ts.map +1 -0
- package/dist/i18n/cs.js +64 -0
- package/dist/i18n/cs.js.map +1 -0
- package/dist/i18n/cy.d.ts +17 -0
- package/dist/i18n/cy.d.ts.map +1 -0
- package/dist/i18n/cy.js +64 -0
- package/dist/i18n/cy.js.map +1 -0
- package/dist/i18n/da.d.ts +17 -0
- package/dist/i18n/da.d.ts.map +1 -0
- package/dist/i18n/da.js +64 -0
- package/dist/i18n/da.js.map +1 -0
- package/dist/i18n/de.d.ts +17 -0
- package/dist/i18n/de.d.ts.map +1 -0
- package/dist/i18n/de.js +64 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/el.d.ts +17 -0
- package/dist/i18n/el.d.ts.map +1 -0
- package/dist/i18n/el.js +64 -0
- package/dist/i18n/el.js.map +1 -0
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts +17 -0
- package/dist/i18n/es.d.ts.map +1 -0
- package/dist/i18n/es.js +64 -0
- package/dist/i18n/es.js.map +1 -0
- package/dist/i18n/et.d.ts +17 -0
- package/dist/i18n/et.d.ts.map +1 -0
- package/dist/i18n/et.js +64 -0
- package/dist/i18n/et.js.map +1 -0
- package/dist/i18n/eu.d.ts +17 -0
- package/dist/i18n/eu.d.ts.map +1 -0
- package/dist/i18n/eu.js +64 -0
- package/dist/i18n/eu.js.map +1 -0
- package/dist/i18n/fa.d.ts +17 -0
- package/dist/i18n/fa.d.ts.map +1 -0
- package/dist/i18n/fa.js +64 -0
- package/dist/i18n/fa.js.map +1 -0
- package/dist/i18n/fi.d.ts +17 -0
- package/dist/i18n/fi.d.ts.map +1 -0
- package/dist/i18n/fi.js +64 -0
- package/dist/i18n/fi.js.map +1 -0
- package/dist/i18n/fr.d.ts +17 -0
- package/dist/i18n/fr.d.ts.map +1 -0
- package/dist/i18n/fr.js +64 -0
- package/dist/i18n/fr.js.map +1 -0
- package/dist/i18n/ga.d.ts +17 -0
- package/dist/i18n/ga.d.ts.map +1 -0
- package/dist/i18n/ga.js +64 -0
- package/dist/i18n/ga.js.map +1 -0
- package/dist/i18n/gl.d.ts +17 -0
- package/dist/i18n/gl.d.ts.map +1 -0
- package/dist/i18n/gl.js +64 -0
- package/dist/i18n/gl.js.map +1 -0
- package/dist/i18n/gu.d.ts +17 -0
- package/dist/i18n/gu.d.ts.map +1 -0
- package/dist/i18n/gu.js +64 -0
- package/dist/i18n/gu.js.map +1 -0
- package/dist/i18n/he.d.ts +17 -0
- package/dist/i18n/he.d.ts.map +1 -0
- package/dist/i18n/he.js +64 -0
- package/dist/i18n/he.js.map +1 -0
- package/dist/i18n/hi.d.ts +17 -0
- package/dist/i18n/hi.d.ts.map +1 -0
- package/dist/i18n/hi.js +64 -0
- package/dist/i18n/hi.js.map +1 -0
- package/dist/i18n/hr.d.ts +17 -0
- package/dist/i18n/hr.d.ts.map +1 -0
- package/dist/i18n/hr.js +64 -0
- package/dist/i18n/hr.js.map +1 -0
- package/dist/i18n/hu.d.ts +17 -0
- package/dist/i18n/hu.d.ts.map +1 -0
- package/dist/i18n/hu.js +64 -0
- package/dist/i18n/hu.js.map +1 -0
- package/dist/i18n/hy.d.ts +17 -0
- package/dist/i18n/hy.d.ts.map +1 -0
- package/dist/i18n/hy.js +64 -0
- package/dist/i18n/hy.js.map +1 -0
- package/dist/i18n/id.d.ts +17 -0
- package/dist/i18n/id.d.ts.map +1 -0
- package/dist/i18n/id.js +64 -0
- package/dist/i18n/id.js.map +1 -0
- package/dist/i18n/is.d.ts +17 -0
- package/dist/i18n/is.d.ts.map +1 -0
- package/dist/i18n/is.js +64 -0
- package/dist/i18n/is.js.map +1 -0
- package/dist/i18n/it.d.ts +17 -0
- package/dist/i18n/it.d.ts.map +1 -0
- package/dist/i18n/it.js +64 -0
- package/dist/i18n/it.js.map +1 -0
- package/dist/i18n/ja.d.ts +17 -0
- package/dist/i18n/ja.d.ts.map +1 -0
- package/dist/i18n/ja.js +64 -0
- package/dist/i18n/ja.js.map +1 -0
- package/dist/i18n/ka.d.ts +17 -0
- package/dist/i18n/ka.d.ts.map +1 -0
- package/dist/i18n/ka.js +64 -0
- package/dist/i18n/ka.js.map +1 -0
- package/dist/i18n/kk.d.ts +17 -0
- package/dist/i18n/kk.d.ts.map +1 -0
- package/dist/i18n/kk.js +64 -0
- package/dist/i18n/kk.js.map +1 -0
- package/dist/i18n/km.d.ts +17 -0
- package/dist/i18n/km.d.ts.map +1 -0
- package/dist/i18n/km.js +64 -0
- package/dist/i18n/km.js.map +1 -0
- package/dist/i18n/kn.d.ts +17 -0
- package/dist/i18n/kn.d.ts.map +1 -0
- package/dist/i18n/kn.js +64 -0
- package/dist/i18n/kn.js.map +1 -0
- package/dist/i18n/ko.d.ts +17 -0
- package/dist/i18n/ko.d.ts.map +1 -0
- package/dist/i18n/ko.js +64 -0
- package/dist/i18n/ko.js.map +1 -0
- package/dist/i18n/ku.d.ts +17 -0
- package/dist/i18n/ku.d.ts.map +1 -0
- package/dist/i18n/ku.js +64 -0
- package/dist/i18n/ku.js.map +1 -0
- package/dist/i18n/ky.d.ts +17 -0
- package/dist/i18n/ky.d.ts.map +1 -0
- package/dist/i18n/ky.js +64 -0
- package/dist/i18n/ky.js.map +1 -0
- package/dist/i18n/lo.d.ts +17 -0
- package/dist/i18n/lo.d.ts.map +1 -0
- package/dist/i18n/lo.js +64 -0
- package/dist/i18n/lo.js.map +1 -0
- package/dist/i18n/lt.d.ts +17 -0
- package/dist/i18n/lt.d.ts.map +1 -0
- package/dist/i18n/lt.js +64 -0
- package/dist/i18n/lt.js.map +1 -0
- package/dist/i18n/lv.d.ts +17 -0
- package/dist/i18n/lv.d.ts.map +1 -0
- package/dist/i18n/lv.js +64 -0
- package/dist/i18n/lv.js.map +1 -0
- package/dist/i18n/mk.d.ts +17 -0
- package/dist/i18n/mk.d.ts.map +1 -0
- package/dist/i18n/mk.js +64 -0
- package/dist/i18n/mk.js.map +1 -0
- package/dist/i18n/ml.d.ts +17 -0
- package/dist/i18n/ml.d.ts.map +1 -0
- package/dist/i18n/ml.js +64 -0
- package/dist/i18n/ml.js.map +1 -0
- package/dist/i18n/mn.d.ts +17 -0
- package/dist/i18n/mn.d.ts.map +1 -0
- package/dist/i18n/mn.js +64 -0
- package/dist/i18n/mn.js.map +1 -0
- package/dist/i18n/mr.d.ts +17 -0
- package/dist/i18n/mr.d.ts.map +1 -0
- package/dist/i18n/mr.js +64 -0
- package/dist/i18n/mr.js.map +1 -0
- package/dist/i18n/ms.d.ts +17 -0
- package/dist/i18n/ms.d.ts.map +1 -0
- package/dist/i18n/ms.js +64 -0
- package/dist/i18n/ms.js.map +1 -0
- package/dist/i18n/my.d.ts +17 -0
- package/dist/i18n/my.d.ts.map +1 -0
- package/dist/i18n/my.js +64 -0
- package/dist/i18n/my.js.map +1 -0
- package/dist/i18n/nb.d.ts +17 -0
- package/dist/i18n/nb.d.ts.map +1 -0
- package/dist/i18n/nb.js +64 -0
- package/dist/i18n/nb.js.map +1 -0
- package/dist/i18n/ne.d.ts +17 -0
- package/dist/i18n/ne.d.ts.map +1 -0
- package/dist/i18n/ne.js +64 -0
- package/dist/i18n/ne.js.map +1 -0
- package/dist/i18n/nl.d.ts +1 -0
- package/dist/i18n/nl.d.ts.map +1 -1
- package/dist/i18n/nl.js +3 -0
- package/dist/i18n/nl.js.map +1 -1
- package/dist/i18n/nn.d.ts +17 -0
- package/dist/i18n/nn.d.ts.map +1 -0
- package/dist/i18n/nn.js +64 -0
- package/dist/i18n/nn.js.map +1 -0
- package/dist/i18n/no.d.ts +17 -0
- package/dist/i18n/no.d.ts.map +1 -0
- package/dist/i18n/no.js +64 -0
- package/dist/i18n/no.js.map +1 -0
- package/dist/i18n/oc.d.ts +17 -0
- package/dist/i18n/oc.d.ts.map +1 -0
- package/dist/i18n/oc.js +64 -0
- package/dist/i18n/oc.js.map +1 -0
- package/dist/i18n/pa.d.ts +17 -0
- package/dist/i18n/pa.d.ts.map +1 -0
- package/dist/i18n/pa.js +64 -0
- package/dist/i18n/pa.js.map +1 -0
- package/dist/i18n/pl.d.ts +17 -0
- package/dist/i18n/pl.d.ts.map +1 -0
- package/dist/i18n/pl.js +64 -0
- package/dist/i18n/pl.js.map +1 -0
- package/dist/i18n/pt-BR.d.ts +17 -0
- package/dist/i18n/pt-BR.d.ts.map +1 -0
- package/dist/i18n/pt-BR.js +64 -0
- package/dist/i18n/pt-BR.js.map +1 -0
- package/dist/i18n/pt.d.ts +17 -0
- package/dist/i18n/pt.d.ts.map +1 -0
- package/dist/i18n/pt.js +64 -0
- package/dist/i18n/pt.js.map +1 -0
- package/dist/i18n/ro.d.ts +17 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +64 -0
- package/dist/i18n/ro.js.map +1 -0
- package/dist/i18n/ru.d.ts +17 -0
- package/dist/i18n/ru.d.ts.map +1 -0
- package/dist/i18n/ru.js +64 -0
- package/dist/i18n/ru.js.map +1 -0
- package/dist/i18n/si.d.ts +17 -0
- package/dist/i18n/si.d.ts.map +1 -0
- package/dist/i18n/si.js +64 -0
- package/dist/i18n/si.js.map +1 -0
- package/dist/i18n/sk.d.ts +17 -0
- package/dist/i18n/sk.d.ts.map +1 -0
- package/dist/i18n/sk.js +64 -0
- package/dist/i18n/sk.js.map +1 -0
- package/dist/i18n/sl.d.ts +17 -0
- package/dist/i18n/sl.d.ts.map +1 -0
- package/dist/i18n/sl.js +64 -0
- package/dist/i18n/sl.js.map +1 -0
- package/dist/i18n/sq.d.ts +17 -0
- package/dist/i18n/sq.d.ts.map +1 -0
- package/dist/i18n/sq.js +64 -0
- package/dist/i18n/sq.js.map +1 -0
- package/dist/i18n/sr.d.ts +17 -0
- package/dist/i18n/sr.d.ts.map +1 -0
- package/dist/i18n/sr.js +64 -0
- package/dist/i18n/sr.js.map +1 -0
- package/dist/i18n/sv.d.ts +17 -0
- package/dist/i18n/sv.d.ts.map +1 -0
- package/dist/i18n/sv.js +64 -0
- package/dist/i18n/sv.js.map +1 -0
- package/dist/i18n/sw.d.ts +17 -0
- package/dist/i18n/sw.d.ts.map +1 -0
- package/dist/i18n/sw.js +64 -0
- package/dist/i18n/sw.js.map +1 -0
- package/dist/i18n/ta.d.ts +17 -0
- package/dist/i18n/ta.d.ts.map +1 -0
- package/dist/i18n/ta.js +64 -0
- package/dist/i18n/ta.js.map +1 -0
- package/dist/i18n/te.d.ts +17 -0
- package/dist/i18n/te.d.ts.map +1 -0
- package/dist/i18n/te.js +64 -0
- package/dist/i18n/te.js.map +1 -0
- package/dist/i18n/tg.d.ts +17 -0
- package/dist/i18n/tg.d.ts.map +1 -0
- package/dist/i18n/tg.js +64 -0
- package/dist/i18n/tg.js.map +1 -0
- package/dist/i18n/th.d.ts +17 -0
- package/dist/i18n/th.d.ts.map +1 -0
- package/dist/i18n/th.js +64 -0
- package/dist/i18n/th.js.map +1 -0
- package/dist/i18n/tl.d.ts +17 -0
- package/dist/i18n/tl.d.ts.map +1 -0
- package/dist/i18n/tl.js +64 -0
- package/dist/i18n/tl.js.map +1 -0
- package/dist/i18n/tr.d.ts +17 -0
- package/dist/i18n/tr.d.ts.map +1 -0
- package/dist/i18n/tr.js +64 -0
- package/dist/i18n/tr.js.map +1 -0
- package/dist/i18n/uk.d.ts +17 -0
- package/dist/i18n/uk.d.ts.map +1 -0
- package/dist/i18n/uk.js +64 -0
- package/dist/i18n/uk.js.map +1 -0
- package/dist/i18n/ur.d.ts +17 -0
- package/dist/i18n/ur.d.ts.map +1 -0
- package/dist/i18n/ur.js +64 -0
- package/dist/i18n/ur.js.map +1 -0
- package/dist/i18n/uz.d.ts +17 -0
- package/dist/i18n/uz.d.ts.map +1 -0
- package/dist/i18n/uz.js +64 -0
- package/dist/i18n/uz.js.map +1 -0
- package/dist/i18n/vi.d.ts +17 -0
- package/dist/i18n/vi.d.ts.map +1 -0
- package/dist/i18n/vi.js +64 -0
- package/dist/i18n/vi.js.map +1 -0
- package/dist/i18n/xh.d.ts +17 -0
- package/dist/i18n/xh.d.ts.map +1 -0
- package/dist/i18n/xh.js +64 -0
- package/dist/i18n/xh.js.map +1 -0
- package/dist/i18n/yo.d.ts +17 -0
- package/dist/i18n/yo.d.ts.map +1 -0
- package/dist/i18n/yo.js +64 -0
- package/dist/i18n/yo.js.map +1 -0
- package/dist/i18n/zh-TW.d.ts +17 -0
- package/dist/i18n/zh-TW.d.ts.map +1 -0
- package/dist/i18n/zh-TW.js +64 -0
- package/dist/i18n/zh-TW.js.map +1 -0
- package/dist/i18n/zh.d.ts +17 -0
- package/dist/i18n/zh.d.ts.map +1 -0
- package/dist/i18n/zh.js +64 -0
- package/dist/i18n/zh.js.map +1 -0
- package/dist/i18n/zu.d.ts +17 -0
- package/dist/i18n/zu.d.ts.map +1 -0
- package/dist/i18n/zu.js +64 -0
- package/dist/i18n/zu.js.map +1 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/kit-translations.d.ts +14 -0
- package/dist/kit-translations.d.ts.map +1 -0
- package/dist/kit-translations.js +101 -0
- package/dist/kit-translations.js.map +1 -0
- package/dist/plugins/audio-graph/index.d.ts.map +1 -1
- package/dist/plugins/audio-graph/index.js +7 -8
- package/dist/plugins/audio-graph/index.js.map +1 -1
- package/dist/plugins/canvas/index.d.ts +8 -6
- package/dist/plugins/canvas/index.d.ts.map +1 -1
- package/dist/plugins/canvas/index.js +36 -18
- package/dist/plugins/canvas/index.js.map +1 -1
- package/dist/plugins/cast-sender/index.d.ts +13 -2
- package/dist/plugins/cast-sender/index.d.ts.map +1 -1
- package/dist/plugins/cast-sender/index.js +11 -6
- package/dist/plugins/cast-sender/index.js.map +1 -1
- package/dist/plugins/equalizer/index.js +36 -36
- package/dist/plugins/equalizer/index.js.map +1 -1
- package/dist/plugins/key-handler/index.d.ts +4 -4
- package/dist/plugins/key-handler/index.d.ts.map +1 -1
- package/dist/plugins/key-handler/index.js +4 -4
- package/dist/plugins/key-handler/index.js.map +1 -1
- package/dist/plugins/media-session/index.d.ts +8 -1
- package/dist/plugins/media-session/index.d.ts.map +1 -1
- package/dist/plugins/media-session/index.js +12 -1
- package/dist/plugins/media-session/index.js.map +1 -1
- package/dist/plugins/spectrum/index.d.ts +48 -0
- package/dist/plugins/spectrum/index.d.ts.map +1 -1
- package/dist/plugins/spectrum/index.js +210 -7
- package/dist/plugins/spectrum/index.js.map +1 -1
- package/dist/plugins/tab-leader/index.d.ts +2 -7
- package/dist/plugins/tab-leader/index.d.ts.map +1 -1
- package/dist/plugins/tab-leader/index.js +11 -12
- package/dist/plugins/tab-leader/index.js.map +1 -1
- package/dist/plugins/visualization/index.d.ts +77 -0
- package/dist/plugins/visualization/index.d.ts.map +1 -1
- package/dist/plugins/visualization/index.js +17 -3
- package/dist/plugins/visualization/index.js.map +1 -1
- package/dist/testing/contract.d.ts.map +1 -1
- package/dist/testing/contract.js +11 -10
- package/dist/testing/contract.js.map +1 -1
- package/dist/testing/describe-plugin-against.d.ts +2 -2
- package/dist/testing/describe-plugin-against.d.ts.map +1 -1
- package/dist/testing/describe-plugin-against.js +13 -7
- package/dist/testing/describe-plugin-against.js.map +1 -1
- package/dist/testing/describe-plugin.d.ts.map +1 -1
- package/dist/testing/describe-plugin.js +25 -9
- package/dist/testing/describe-plugin.js.map +1 -1
- package/dist/testing/leak-harness.d.ts +1 -1
- package/dist/testing/leak-harness.d.ts.map +1 -1
- package/dist/testing/leak-harness.js +2 -1
- package/dist/testing/leak-harness.js.map +1 -1
- package/dist/testing/stub-player.d.ts +19 -14
- package/dist/testing/stub-player.d.ts.map +1 -1
- package/dist/testing/stub-player.js +65 -22
- package/dist/testing/stub-player.js.map +1 -1
- package/dist/types/chapter.d.ts +7 -0
- package/dist/types/chapter.d.ts.map +1 -1
- package/dist/types/config.d.ts +36 -11
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/events.d.ts +153 -14
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/playback.d.ts +5 -2
- package/dist/types/playback.d.ts.map +1 -1
- package/dist/types/player.d.ts +114 -51
- package/dist/types/player.d.ts.map +1 -1
- package/dist/types/player.js.map +1 -1
- package/dist/types/plugin.d.ts +28 -0
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/state.d.ts +26 -0
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/state.js +28 -0
- package/dist/types/state.js.map +1 -1
- package/dist/types/tracks.d.ts +22 -0
- package/dist/types/tracks.d.ts.map +1 -1
- package/dist/vite-plugin.js +1 -1
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +7 -8
- package/dist/compat.d.ts +0 -42
- package/dist/compat.d.ts.map +0 -1
- package/dist/compat.js +0 -42
- 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
|
|
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:** [
|
|
38
|
-
- **Music player:** [
|
|
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 {
|
|
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`, `
|
|
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/
|
|
128
|
-
| `@nomercy-entertainment/nomercy-player-core/
|
|
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
|
-
|
|
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-
|
|
160
|
-
| `IPlaylistGenerator` (music-
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
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.
|
|
9
|
+
The shared, headless engine that the video and music players are built on.
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
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
|
-
- [
|
|
49
|
-
- [
|
|
50
|
-
- [
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
|
|
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@
|
|
14
|
+
npm install @nomercy-entertainment/nomercy-player-core@rc
|
|
10
15
|
```
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`npm
|
|
23
|
-
`npm
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
4.
|
|
28
|
-
|
|
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
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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((
|
|
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
|
|
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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