@synapse-sdk/media 0.3.9 → 0.4.1
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/dist/decoder.d.ts +1 -1
- package/dist/decoder.js +2 -4
- package/dist/sync.d.ts +1 -5
- package/package.json +4 -4
package/dist/decoder.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type VideoSink = (vf: VideoFrame, meta: DecodedFrameMeta) => void;
|
|
|
14
14
|
export interface H264DecoderOptions {
|
|
15
15
|
/** `"no-preference"` (default) lets Chrome pick the hardware decoder; `"prefer-software"` is about 1 ms at low resolutions. */
|
|
16
16
|
hardwareAcceleration?: HardwareAcceleration;
|
|
17
|
-
/** Sync policy overrides; the defaults are the shared
|
|
17
|
+
/** Sync policy overrides; the defaults are the shared `SYNC_DEFAULT`. */
|
|
18
18
|
sync?: Partial<SyncConfig>;
|
|
19
19
|
/** The decoder has produced nothing for `stuckFrames` chunks: ask the publisher for an IDR (`videoSubscriber` wires this to the `<topic>/idr` service). */
|
|
20
20
|
onRequestIdr?: () => void;
|
package/dist/decoder.js
CHANGED
|
@@ -34,10 +34,8 @@ export class H264Decoder {
|
|
|
34
34
|
constructor(opts = {}) {
|
|
35
35
|
this.opts = opts;
|
|
36
36
|
requireWebCodecs("H264Decoder");
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
// an IDR (the owner asks for one through `onRequestIdr`; the sync policy raises it while waiting too).
|
|
40
|
-
this.sync = new DecoderSync({ startAtRecovery: false, ...opts.sync });
|
|
37
|
+
// A browser-specific default for the sync policy can go here, ahead of `opts.sync`; none is set today.
|
|
38
|
+
this.sync = new DecoderSync({ ...opts.sync });
|
|
41
39
|
this.onRequestIdr = opts.onRequestIdr;
|
|
42
40
|
}
|
|
43
41
|
/** Sets the sink that owns decoded pictures (one at a time; replacing detaches the previous). Returns a detach function. */
|
package/dist/sync.d.ts
CHANGED
|
@@ -7,11 +7,7 @@ export interface SyncConfig {
|
|
|
7
7
|
wedgedFrames: number;
|
|
8
8
|
/** Silence tolerated after a start at a recovery point (a refresh period plus slack). */
|
|
9
9
|
recoverySilenceFrames: number;
|
|
10
|
-
/**
|
|
11
|
-
* A recovery point with parameter sets is a start point (default true, the Rust/libav rule).
|
|
12
|
-
* `false` for decoders that can only start on an IDR: WebCodecs in Chromium verifies that a
|
|
13
|
-
* chunk labelled `key` carries an IDR and rejects the recovery-point start (`H264Decoder` sets this).
|
|
14
|
-
*/
|
|
10
|
+
/** A recovery point with parameter sets is a start point (default true). `false` waits for an IDR. */
|
|
15
11
|
startAtRecovery: boolean;
|
|
16
12
|
}
|
|
17
13
|
/** `synapse_media::SyncConfig::default()`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synapse-sdk/media",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Synapse SDK media: H.264 video in the browser — encoder, decoder, canvas sink, video publisher/subscriber and the React useVideo hook.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@synapse-sdk/core": "0.
|
|
22
|
-
"@synapse-sdk/client": "0.
|
|
21
|
+
"@synapse-sdk/core": "0.4.1",
|
|
22
|
+
"@synapse-sdk/client": "0.4.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@synapse-sdk/react": "0.
|
|
25
|
+
"@synapse-sdk/react": "0.4.1",
|
|
26
26
|
"react": ">=18"
|
|
27
27
|
},
|
|
28
28
|
"peerDependenciesMeta": {
|