@videojs/mux-audio 10.0.0-rc.1 → 10.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,14 +4,22 @@ The Video.js playback adapter for Mux-hosted audio, over [hls.js](https://github
4
4
  extends the Mux video adapter from `@videojs/mux-video` and plays through an `<audio>` element, so audio installs by the
5
5
  media it plays.
6
6
 
7
- ## Installation
8
-
9
7
  ```bash
10
8
  pnpm add @videojs/html @videojs/mux-audio
11
9
  # or
12
10
  pnpm add @videojs/react @videojs/mux-audio
13
11
  ```
14
12
 
13
+ ## AI Quickstart
14
+
15
+ Using an AI coding agent? Install the [Video.js skill](https://github.com/videojs/skills) so it reads the docs that
16
+ match this package version before writing code. Then print installation instructions with this adapter selected:
17
+
18
+ ```sh
19
+ npx @videojs/cli agents init --framework react --preset audio --media mux-audio
20
+ npx @videojs/cli agents init --framework html --preset audio --media mux-audio
21
+ ```
22
+
15
23
  ## Usage
16
24
 
17
25
  ```ts
@@ -3,5 +3,3 @@ import { MuxVideoAdapter } from "@videojs/mux-video";
3
3
  var MuxAudioAdapter = class extends MuxVideoAdapter {};
4
4
  //#endregion
5
5
  export { MuxAudioAdapter };
6
-
7
- //# sourceMappingURL=index.js.map
@@ -9,6 +9,9 @@ import { HlsAudioAdapter } from "@videojs/spf/hls-audio";
9
9
  * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and
10
10
  * downloads video renditions it never shows.
11
11
  *
12
+ * `source.drm` is accepted but inert, unlike on the video flavor: the audio-only engine composes no EME. Mux encrypts
13
+ * video renditions and leaves audio clear, so a protected playback ID still plays here.
14
+ *
12
15
  * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as
13
16
  * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The
14
17
  * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the
@@ -25,5 +28,3 @@ var MuxAudioAdapter = class extends MuxMixin(HlsAudioAdapter) {
25
28
  };
26
29
  //#endregion
27
30
  export { MuxAudioAdapter };
28
-
29
- //# sourceMappingURL=adapter.js.map
@@ -1,7 +1,7 @@
1
1
  import { MuxAdapterProps } from "@videojs/mux-video/spf";
2
2
  import { HlsAudioAdapter, HlsAudioAdapterProps } from "@videojs/spf/hls-audio";
3
3
  //#region src/spf/adapter.d.ts
4
- declare const MuxAudioAdapter_base: import("@videojs/utils/types").Constructor<HlsAudioAdapter & import("@videojs/mux-video/spf").MuxAdapterAPI, any[]> & Omit<typeof HlsAudioAdapter, "prototype"> & {
4
+ declare const MuxAudioAdapter_base: import("@videojs/utils/types").Constructor<Omit<HlsAudioAdapter, "source"> & import("@videojs/mux-video/spf").MuxAdapterAPI, [options?: import("@videojs/spf/hls-audio").HlsAudioAdapterOptions]> & Omit<typeof HlsAudioAdapter, "defaultProps" | "prototype"> & {
5
5
  readonly alternativeMediaSuggestion: string | undefined;
6
6
  readonly defaultProps: MuxAdapterProps;
7
7
  };
@@ -13,13 +13,16 @@ declare const MuxAudioAdapter_base: import("@videojs/utils/types").Constructor<H
13
13
  * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and
14
14
  * downloads video renditions it never shows.
15
15
  *
16
+ * `source.drm` is accepted but inert, unlike on the video flavor: the audio-only engine composes no EME. Mux encrypts
17
+ * video renditions and leaves audio clear, so a protected playback ID still plays here.
18
+ *
16
19
  * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as
17
20
  * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The
18
21
  * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the
19
22
  * known shortcoming on the video flavor, which shares the derivation.
20
23
  */
21
24
  declare class MuxAudioAdapter extends MuxAudioAdapter_base {
22
- static readonly defaultProps: Omit<HlsAudioAdapterProps, 'src'> & MuxAdapterProps;
25
+ static readonly defaultProps: Omit<HlsAudioAdapterProps, 'src' | 'source'> & MuxAdapterProps;
23
26
  }
24
27
  //#endregion
25
28
  export { MuxAudioAdapter };
@@ -9,6 +9,9 @@ import { HlsAudioAdapter } from "@videojs/spf/hls-audio";
9
9
  * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and
10
10
  * downloads video renditions it never shows.
11
11
  *
12
+ * `source.drm` is accepted but inert, unlike on the video flavor: the audio-only engine composes no EME. Mux encrypts
13
+ * video renditions and leaves audio clear, so a protected playback ID still plays here.
14
+ *
12
15
  * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as
13
16
  * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The
14
17
  * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","names":[],"sources":["../../../src/spf/adapter.ts"],"sourcesContent":["// Only the mixin is used from `@videojs/mux-video/spf`. Its `MuxVideoAdapter` (and the full HLS engine behind it) is\n// left for the consumer's bundler to drop, which `sideEffects: false` on that package allows, so this entry stays\n// audio-only.\nimport { type MuxAdapterProps, MuxMixin } from '@videojs/mux-video/spf';\nimport { HlsAudioAdapter, type HlsAudioAdapterProps } from '@videojs/spf/hls-audio';\n\n/**\n * The Mux Media over the SPF audio-only HLS engine.\n *\n * Same Mux surface as the video flavor — `src`, the structured `source`, and the derived `contentData` all come from\n * the shared mixin — over the subtractive engine, so only the audio renditions of whatever the playback ID names are\n * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and\n * downloads video renditions it never shows.\n *\n * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as\n * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The\n * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the\n * known shortcoming on the video flavor, which shares the derivation.\n */\nexport class MuxAudioAdapter extends MuxMixin(HlsAudioAdapter) {\n static override readonly defaultProps: Omit<HlsAudioAdapterProps, 'src'> & MuxAdapterProps = {\n ...HlsAudioAdapter.defaultProps,\n src: '',\n source: null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAa,kBAAb,cAAqC,SAAS,eAAe,CAAC,CAAC;;EACgC,KAAA,eAAA;GAC3F,GAAG,gBAAgB;GACnB,KAAK;GACL,QAAQ;EACV;;AACF"}
1
+ {"version":3,"file":"adapter.js","names":[],"sources":["../../../src/spf/adapter.ts"],"sourcesContent":["// Only the mixin is used from `@videojs/mux-video/spf`. Its `MuxVideoAdapter` (and the full HLS engine behind it) is\n// left for the consumer's bundler to drop, which `sideEffects: false` on that package allows, so this entry stays\n// audio-only.\nimport { type MuxAdapterProps, MuxMixin } from '@videojs/mux-video/spf';\nimport { HlsAudioAdapter, type HlsAudioAdapterProps } from '@videojs/spf/hls-audio';\n\n/**\n * The Mux Media over the SPF audio-only HLS engine.\n *\n * Same Mux surface as the video flavor — `src`, the structured `source`, and the derived `contentData` all come from\n * the shared mixin — over the subtractive engine, so only the audio renditions of whatever the playback ID names are\n * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and\n * downloads video renditions it never shows.\n *\n * `source.drm` is accepted but inert, unlike on the video flavor: the audio-only engine composes no EME. Mux encrypts\n * video renditions and leaves audio clear, so a protected playback ID still plays here.\n *\n * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as\n * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The\n * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the\n * known shortcoming on the video flavor, which shares the derivation.\n */\nexport class MuxAudioAdapter extends MuxMixin(HlsAudioAdapter) {\n static override readonly defaultProps: Omit<HlsAudioAdapterProps, 'src' | 'source'> & MuxAdapterProps = {\n ...HlsAudioAdapter.defaultProps,\n src: '',\n source: null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,IAAa,kBAAb,cAAqC,SAAS,eAAe,CAAC,CAAC;;EAC2C,KAAA,eAAA;GACtG,GAAG,gBAAgB;GACnB,KAAK;GACL,QAAQ;EACV;;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videojs/mux-audio",
3
- "version": "10.0.0-rc.1",
3
+ "version": "10.0.0-rc.3",
4
4
  "description": "Mux audio playback adapter for Video.js, over hls.js",
5
5
  "keywords": [
6
6
  "hls",
@@ -9,6 +9,7 @@
9
9
  "streaming",
10
10
  "videojs"
11
11
  ],
12
+ "homepage": "https://videojs.org",
12
13
  "license": "Apache-2.0",
13
14
  "repository": {
14
15
  "type": "git",
@@ -39,9 +40,9 @@
39
40
  "access": "public"
40
41
  },
41
42
  "dependencies": {
42
- "@videojs/mux-video": "10.0.0-rc.1",
43
- "@videojs/utils": "10.0.0-rc.1",
44
- "@videojs/spf": "10.0.0-rc.1"
43
+ "@videojs/mux-video": "10.0.0-rc.3",
44
+ "@videojs/spf": "10.0.0-rc.3",
45
+ "@videojs/utils": "10.0.0-rc.3"
45
46
  },
46
47
  "devDependencies": {
47
48
  "jsdom": "^26.1.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { MuxVideoAdapter } from '@videojs/mux-video';\n\nexport type { MuxSource, MuxVideoAdapterProps as MuxAudioAdapterProps } from '@videojs/mux-video';\n\n// TODO(mux): audio extending video is upside down. The hls.js-backed Mux behavior should move to a shared base that a\n// video and an audio adapter both extend; until then this class exists so audio installs by the media it plays and has\n// a home for audio-only behavior.\nexport class MuxAudioAdapter extends MuxVideoAdapter {}\n"],"mappings":";;AAOA,IAAa,kBAAb,cAAqC,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.js","names":[],"sources":["../../../src/spf/adapter.ts"],"sourcesContent":["// Only the mixin is used from `@videojs/mux-video/spf`. Its `MuxVideoAdapter` (and the full HLS engine behind it) is\n// left for the consumer's bundler to drop, which `sideEffects: false` on that package allows, so this entry stays\n// audio-only.\nimport { type MuxAdapterProps, MuxMixin } from '@videojs/mux-video/spf';\nimport { HlsAudioAdapter, type HlsAudioAdapterProps } from '@videojs/spf/hls-audio';\n\n/**\n * The Mux Media over the SPF audio-only HLS engine.\n *\n * Same Mux surface as the video flavor — `src`, the structured `source`, and the derived `contentData` all come from\n * the shared mixin — over the subtractive engine, so only the audio renditions of whatever the playback ID names are\n * fetched. That is the one place this diverges from the hls.js-backed `<mux-audio>`, which runs the full engine and\n * downloads video renditions it never shows.\n *\n * `contentData` is kept rather than dropped, for the same reason its hls.js counterpart has it: a playback ID played as\n * audio is usually a _video_ asset, whose poster and storyboard exist and which an audio skin may well want. The\n * element ignores it either way. Mux publishes neither for a genuinely audio-only asset, so those URLs 404 — see the\n * known shortcoming on the video flavor, which shares the derivation.\n */\nexport class MuxAudioAdapter extends MuxMixin(HlsAudioAdapter) {\n static override readonly defaultProps: Omit<HlsAudioAdapterProps, 'src'> & MuxAdapterProps = {\n ...HlsAudioAdapter.defaultProps,\n src: '',\n source: null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAa,kBAAb,cAAqC,SAAS,eAAe,CAAC,CAAC;;EACgC,KAAA,eAAA;GAC3F,GAAG,gBAAgB;GACnB,KAAK;GACL,QAAQ;EACV;;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;cAOa,wBAAwB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","names":[],"sources":["../../../src/spf/adapter.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAmBa,wBAAwB;kBACV,cAAc,KAAK,+BAA+B"}