@livedigital/client 3.60.0 → 3.61.0-encoded-screenshare.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/Client.d.ts +1 -1
- package/dist/engine/handlers/MediaEventHandler.d.ts +1 -0
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/media/encodedVideo/EncodedVideoSender.d.ts +15 -0
- package/dist/engine/media/encodedVideo/EncodedVideoStats.d.ts +8 -0
- package/dist/engine/media/encodedVideo/FreshnessGate.d.ts +17 -0
- package/dist/engine/media/encodedVideo/Vp8FrameEncoder.d.ts +22 -0
- package/dist/engine/media/encodedVideo/constants.d.ts +12 -0
- package/dist/engine/media/encodedVideo/encodedVideoFraming.d.ts +60 -0
- package/dist/engine/media/encodedVideo/types.d.ts +51 -0
- package/dist/engine/media/index.d.ts +4 -3
- package/dist/engine/media/tracks/DefaultBaseTrack.d.ts +2 -0
- package/dist/engine/media/tracks/DefaultVideoTrack.d.ts +2 -0
- package/dist/engine/media/tracks/EncodedVideoTrack.d.ts +24 -0
- package/dist/engine/signalingApiClient/api.d.ts +1 -1
- package/dist/helpers/media.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/inversify.factories.d.ts +1 -0
- package/dist/inversify.tokens.d.ts +1 -0
- package/dist/proto/generated/channel_message/media_event.d.ts +3 -0
- package/dist/proto/generated/producer/producer_key_frame_request.d.ts +25 -0
- package/dist/types/common.d.ts +8 -0
- package/dist/types/media.d.ts +6 -0
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
|
@@ -190,7 +190,7 @@ declare class Client {
|
|
|
190
190
|
* Регистрирует в SDK уже созданный приложением видеотрек, чтобы им можно было управлять и публиковать его.
|
|
191
191
|
* @group Медиа
|
|
192
192
|
*/
|
|
193
|
-
createCustomVideoTrack(options: CreateCustomVideoOptions): Track
|
|
193
|
+
createCustomVideoTrack(options: CreateCustomVideoOptions): Promise<Track>;
|
|
194
194
|
/**
|
|
195
195
|
* Удаляет локальный трек из жизненного цикла SDK и освобождает связанные ресурсы.
|
|
196
196
|
* @group Медиа
|
|
@@ -11,6 +11,7 @@ declare class MediaEventHandler {
|
|
|
11
11
|
private readonly clientEventEmitter;
|
|
12
12
|
constructor(media: Media, internalEventEmitter: EnhancedEventEmitter, peersStorage: PeersStorage, clientEventEmitter: EnhancedEventEmitter, loggerFactory: (namespace: string) => Logger);
|
|
13
13
|
handleMediaEvent(event: MediaEvent): void;
|
|
14
|
+
private handleProducerKeyFrameRequested;
|
|
14
15
|
private handleProducerCreated;
|
|
15
16
|
private handleProducerClosed;
|
|
16
17
|
private handleProducerPaused;
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare class Engine {
|
|
|
73
73
|
createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<AudioTrack>;
|
|
74
74
|
createScreenMediaTracks(options?: CreateScreenMediaOptions): Promise<Track[]>;
|
|
75
75
|
createCustomAudioTrack(options: CreateCustomAudioOptions): AudioTrack;
|
|
76
|
-
createCustomVideoTrack(options: CreateCustomVideoOptions): Track
|
|
76
|
+
createCustomVideoTrack(options: CreateCustomVideoOptions): Promise<Track>;
|
|
77
77
|
deleteTrack(tracks: BaseTrack): Promise<void>;
|
|
78
78
|
transportsStats(): TransportsWebRTCStats | undefined;
|
|
79
79
|
setSignalingServerUrl(url: string): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EncodedVideoSenderParams, EncodedVideoStatsSnapshot } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Producer-side of the encoded screen share: pulls raw frames from a MediaStreamTrack
|
|
4
|
+
* (MediaStreamTrackProcessor), encodes them with WebCodecs (VideoEncoder), frames them
|
|
5
|
+
* and sends them over a mediasoup DataProducer. The server reconstructs a normal RTP
|
|
6
|
+
* video producer from this stream — no encoder involved on the server.
|
|
7
|
+
*/
|
|
8
|
+
export declare class EncodedVideoSender {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(params: EncodedVideoSenderParams);
|
|
11
|
+
start(): void;
|
|
12
|
+
requestKeyFrame(): void;
|
|
13
|
+
stop(): void;
|
|
14
|
+
getStatsSnapshot(): EncodedVideoStatsSnapshot;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EncodedVideoStatsSnapshot } from './types';
|
|
2
|
+
export declare class EncodedVideoStats {
|
|
3
|
+
#private;
|
|
4
|
+
frameSent(bytes: number, keyFrame: boolean): void;
|
|
5
|
+
frameDropped(): void;
|
|
6
|
+
frameShed(): void;
|
|
7
|
+
snapshot(bufferedAmount: number, readyBufferedAmount: number): EncodedVideoStatsSnapshot;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FreshnessGateDecision } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* "Latest-frame-wins" admission control for the encoded stream. A frame is admitted to the SCTP channel
|
|
4
|
+
* only when the send queue has drained to ~one frame; otherwise it is already stale and dropped rather
|
|
5
|
+
* than queued, so the frame rate self-paces to the link and quality is never reduced. Dropping breaks the
|
|
6
|
+
* encoder's reference chain, so the next admitted frame must be a key frame to re-sync the consumer.
|
|
7
|
+
*
|
|
8
|
+
* Pure decision unit (no I/O), mirroring the server-side FrameSequencer.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FreshnessGate {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(readyBufferedAmount: number);
|
|
13
|
+
get chainBroken(): boolean;
|
|
14
|
+
decide(bufferedAmount: number, isKeyFrame: boolean): FreshnessGateDecision;
|
|
15
|
+
/** A key frame was actually sent → the decoder re-syncs, so the chain is healed. */
|
|
16
|
+
onKeyFrameSent(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Vp8FrameEncoderConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Thin wrapper around a WebCodecs VideoEncoder for the encoded screen share. Owns encoder creation and
|
|
4
|
+
* (re)configuration on a resolution change, and forwards output chunks. This is the only WebCodecs/codec
|
|
5
|
+
* coupling of the sender — the natural seam for a future Worker offload or a VP9/AV1 upgrade.
|
|
6
|
+
*
|
|
7
|
+
* Always VBR at the target bitrate: quality is fixed by design; only the frame rate adapts under
|
|
8
|
+
* backpressure (see FreshnessGate).
|
|
9
|
+
*/
|
|
10
|
+
export declare class Vp8FrameEncoder {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(config: Vp8FrameEncoderConfig, onChunk: (chunk: EncodedVideoChunk) => void, onError: (error: unknown) => void);
|
|
13
|
+
get isConfigured(): boolean;
|
|
14
|
+
get width(): number;
|
|
15
|
+
get height(): number;
|
|
16
|
+
/**
|
|
17
|
+
* Encodes a frame, (re)configuring for its dimensions first. Returns true if it (re)configured — the
|
|
18
|
+
* first output after a configure is always a key frame, so the caller can resync its key-frame counter.
|
|
19
|
+
*/
|
|
20
|
+
encode(frame: VideoFrame, keyFrame: boolean): boolean;
|
|
21
|
+
close(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const DEFAULT_BITRATE = 2500000;
|
|
2
|
+
export declare const DEFAULT_FRAMERATE = 15;
|
|
3
|
+
export declare const DEFAULT_READY_BUFFERED_AMOUNT = 65536;
|
|
4
|
+
export declare const STATIC_IDLE_THRESHOLD_MS = 200;
|
|
5
|
+
export declare const KEEPALIVE_INTERVAL_MS = 500;
|
|
6
|
+
export declare const MICROSECONDS_PER_SECOND = 1000000;
|
|
7
|
+
export declare const MICROSECONDS_PER_MS = 1000;
|
|
8
|
+
export declare const MS_PER_SECOND = 1000;
|
|
9
|
+
export declare const BITS_PER_BYTE = 8;
|
|
10
|
+
export declare const RTP_TICKS_PER_US = 0.09;
|
|
11
|
+
export declare const VP8_CODEC = "vp8";
|
|
12
|
+
export declare const MIN_WINDOW_MS = 1;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encoded-screenshare wire format (FROZEN v1).
|
|
3
|
+
*
|
|
4
|
+
* One encoded video frame (compressed codec bitstream, e.g. a VP8 frame from WebCodecs) is split
|
|
5
|
+
* into one or more SCTP messages. Each message carries a 14-byte big-endian header + a payload slice.
|
|
6
|
+
* Source of truth: docs/encoded-screenshare-design.md §5.1 (in livedigital-sdk). This module is
|
|
7
|
+
* duplicated VERBATIM across livedigital-sdk and livedigital-server (no shared TS package);
|
|
8
|
+
* keep both copies byte-identical and in sync with the design doc.
|
|
9
|
+
*
|
|
10
|
+
* Implementation uses Uint8Array + DataView only (no Node Buffer API) so the exact same code runs in
|
|
11
|
+
* the browser (SDK producer, packFrame) and in Node (server ingest, FrameReassembler).
|
|
12
|
+
*
|
|
13
|
+
* Header layout (big-endian):
|
|
14
|
+
* 0 u8 version = 1
|
|
15
|
+
* 1 u8 flags (bit0 = keyframe)
|
|
16
|
+
* 2 u32 frameId
|
|
17
|
+
* 6 u32 rtpTimestamp90k
|
|
18
|
+
* 10 u16 fragIndex
|
|
19
|
+
* 12 u16 fragCount
|
|
20
|
+
* 14 .. payload
|
|
21
|
+
*/
|
|
22
|
+
export declare const ENCODED_VIDEO_FRAMING_VERSION = 1;
|
|
23
|
+
export declare const FRAME_HEADER_SIZE = 14;
|
|
24
|
+
/**
|
|
25
|
+
* Conservative default SCTP message size (header + payload) for the packer. Well under the mediasoup
|
|
26
|
+
* router `maxMessageSize` (262144) and classic cross-browser data-channel limits. Tunable per call;
|
|
27
|
+
* the reassembler is agnostic to fragment size (it relies on fragIndex/fragCount).
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_MAX_MESSAGE_BYTES = 65536;
|
|
30
|
+
export interface PackFrameInput {
|
|
31
|
+
frameId: number;
|
|
32
|
+
rtpTimestamp90k: number;
|
|
33
|
+
keyFrame: boolean;
|
|
34
|
+
/** Compressed codec bitstream for a single frame. */
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
}
|
|
37
|
+
export interface CompleteFrame {
|
|
38
|
+
frameId: number;
|
|
39
|
+
rtpTimestamp90k: number;
|
|
40
|
+
keyFrame: boolean;
|
|
41
|
+
data: Uint8Array;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Split one encoded frame into wire messages. Returns >= 1 Uint8Array messages, each ready to be sent
|
|
45
|
+
* over a DataProducer.
|
|
46
|
+
*/
|
|
47
|
+
export declare function packFrame(input: PackFrameInput, maxMessageBytes?: number): Uint8Array[];
|
|
48
|
+
/**
|
|
49
|
+
* Reassembles wire messages back into complete encoded frames. Stateful (buffers multi-fragment
|
|
50
|
+
* frames). `push()` returns a CompleteFrame once all fragments of a frame have arrived, else null.
|
|
51
|
+
*
|
|
52
|
+
* Single-fragment frames are returned immediately (zero-copy: `data` aliases the input message's
|
|
53
|
+
* payload). Multi-fragment payloads are copied. `maxPending` bounds memory against never-completing
|
|
54
|
+
* frames (a lost fragment on an unreliable channel); on reliable-ordered SCTP it should stay ~1.
|
|
55
|
+
*/
|
|
56
|
+
export declare class FrameReassembler {
|
|
57
|
+
#private;
|
|
58
|
+
constructor(maxPending?: number);
|
|
59
|
+
push(message: Uint8Array): CompleteFrame | null;
|
|
60
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { types } from 'mediasoup-client';
|
|
2
|
+
/** Runtime tuning for the encoded-video sender; every field falls back to a default (see constants.ts). */
|
|
3
|
+
export interface EncodedVideoSenderConfig {
|
|
4
|
+
bitrate?: number;
|
|
5
|
+
framerate?: number;
|
|
6
|
+
/** Freshness gate: admit a frame only when the send queue is at/below this many bytes (~one frame). */
|
|
7
|
+
readyBufferedAmount?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface EncodedVideoSenderParams {
|
|
10
|
+
track: MediaStreamTrack;
|
|
11
|
+
dataProducer: types.DataProducer;
|
|
12
|
+
config?: EncodedVideoSenderConfig;
|
|
13
|
+
logger?: (message: string, context?: unknown) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Minimal typed constructor for MediaStreamTrackProcessor: lib.dom's MediaStreamTrackProcessorInit is
|
|
17
|
+
* incomplete in this TS version (missing `track`), and this shape types `readable` as ReadableStream<VideoFrame>.
|
|
18
|
+
*/
|
|
19
|
+
export type VideoFrameProcessorCtor = new (init: {
|
|
20
|
+
track: MediaStreamTrack;
|
|
21
|
+
}) => {
|
|
22
|
+
readable: ReadableStream<VideoFrame>;
|
|
23
|
+
};
|
|
24
|
+
export interface Vp8FrameEncoderConfig {
|
|
25
|
+
bitrate: number;
|
|
26
|
+
framerate: number;
|
|
27
|
+
}
|
|
28
|
+
export interface FreshnessGateDecision {
|
|
29
|
+
/** Admit this chunk to the data channel. */
|
|
30
|
+
send: boolean;
|
|
31
|
+
/** The caller must force the next encoded frame to be a key frame (the chain is broken). */
|
|
32
|
+
needKeyFrame: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface EncodedVideoStatsSnapshot {
|
|
35
|
+
/** Frames admitted to the channel, per second. */
|
|
36
|
+
fps: number;
|
|
37
|
+
/** Admitted bitrate — what the sender pushed into the queue, kbit/s. */
|
|
38
|
+
kbps: number;
|
|
39
|
+
/** Bytes that actually left the send queue, kbit/s — approximates the link throughput. */
|
|
40
|
+
wireKbps: number;
|
|
41
|
+
/** Key frames admitted this window. */
|
|
42
|
+
keyFrames: number;
|
|
43
|
+
/** Frames dropped by the frame-rate cap, per second. */
|
|
44
|
+
droppedFps: number;
|
|
45
|
+
/** Frames dropped by the freshness gate under backpressure, per second. */
|
|
46
|
+
sheddedFps: number;
|
|
47
|
+
/** The send queue is above the freshness threshold — the frame rate is being throttled. */
|
|
48
|
+
gated: boolean;
|
|
49
|
+
/** Current SCTP send-queue depth, bytes. */
|
|
50
|
+
bufferedAmount: number;
|
|
51
|
+
}
|
|
@@ -24,12 +24,13 @@ declare class Media {
|
|
|
24
24
|
private readonly integrationsService;
|
|
25
25
|
private readonly processorsCache;
|
|
26
26
|
private readonly videoTrackFactory;
|
|
27
|
+
private readonly encodedVideoTrackFactory;
|
|
27
28
|
private readonly mediaStreamTrackManager;
|
|
28
29
|
private readonly signalingApiClient;
|
|
29
30
|
isDeviceLoaded: boolean;
|
|
30
31
|
private device?;
|
|
31
32
|
private readonly tracks;
|
|
32
|
-
constructor(config: ConfigService, loggerFactory: (namespace: string) => Logger, audioTrackFactory: AudioTrackFactory, clientEventEmitter: EnhancedEventEmitter, integrationsService: IntegrationsService, processorsCache: ProcessorsCache, videoTrackFactory: VideoTrackFactory, mediaStreamTrackManager: MediaStreamTrackManager, signalingApiClient: SignalingApiClient);
|
|
33
|
+
constructor(config: ConfigService, loggerFactory: (namespace: string) => Logger, audioTrackFactory: AudioTrackFactory, clientEventEmitter: EnhancedEventEmitter, integrationsService: IntegrationsService, processorsCache: ProcessorsCache, videoTrackFactory: VideoTrackFactory, encodedVideoTrackFactory: VideoTrackFactory, mediaStreamTrackManager: MediaStreamTrackManager, signalingApiClient: SignalingApiClient);
|
|
33
34
|
get mediasoupDevice(): Device;
|
|
34
35
|
get effectsSDKInitialized(): boolean;
|
|
35
36
|
get effectsSDKParams(): InitEffectsSDKParams | null;
|
|
@@ -38,8 +39,8 @@ declare class Media {
|
|
|
38
39
|
getTrackCodec(track: TrackWithEncodings): types.RtpCodecCapability | undefined;
|
|
39
40
|
private createTracks;
|
|
40
41
|
createUserMediaTracks(constraints: MediaStreamConstraints): Promise<BaseTrack[]>;
|
|
41
|
-
createDisplayMediaTracks(constraints: MediaStreamConstraints): Promise<BaseTrack[]>;
|
|
42
|
-
createCustomMediaTrack(mediaStreamTrack: MediaStreamTrack, constraints: MediaStreamConstraints): BaseTrack;
|
|
42
|
+
createDisplayMediaTracks(constraints: MediaStreamConstraints, encoded?: boolean): Promise<BaseTrack[]>;
|
|
43
|
+
createCustomMediaTrack(mediaStreamTrack: MediaStreamTrack, constraints: MediaStreamConstraints, encoded?: boolean): BaseTrack;
|
|
43
44
|
deleteTrack(track: BaseTrack): Promise<void>;
|
|
44
45
|
getAllTracks(): BaseTrack[];
|
|
45
46
|
publishedTracks(): BaseTrack[];
|
|
@@ -5,6 +5,7 @@ import { type BaseTrackInfo, type EncoderConfig, TrackLabel, type TrackLabelStri
|
|
|
5
5
|
import type { InternalObserverEvents } from '../../../types/engine';
|
|
6
6
|
import type { BaseTrack, BaseTrackDependenciesParams, BaseTrackParams, ProducerAppData } from '../../../types/media';
|
|
7
7
|
import type Logger from '../../Logger';
|
|
8
|
+
import type Network from '../../network';
|
|
8
9
|
import type { MOSScores } from '../../../qoe/types';
|
|
9
10
|
type BaseTrackConstructorParams = BaseTrackParams & BaseTrackDependenciesParams;
|
|
10
11
|
export interface LoggerContext {
|
|
@@ -35,6 +36,7 @@ declare class DefaultBaseTrack implements BaseTrack {
|
|
|
35
36
|
get isPublished(): boolean;
|
|
36
37
|
get isPaused(): boolean;
|
|
37
38
|
get internalEventEmitter(): EnhancedEventEmitter<InternalObserverEvents>;
|
|
39
|
+
protected get network(): Network;
|
|
38
40
|
getLabel(): TrackLabel;
|
|
39
41
|
setLabel(label: TrackLabel | TrackLabelString): void;
|
|
40
42
|
setEncoderConfig(encoderConfig: EncoderConfig): void;
|
|
@@ -4,6 +4,7 @@ import { type VideoCodec, type VideoEncoderConfig } from '../../../types/common'
|
|
|
4
4
|
import type { ClientObserverEvents } from '../../../types/engine';
|
|
5
5
|
import type { BaseTrackDependenciesParams, BaseTrackParams, VideoTrack, VideoTrackPublishParams } from '../../../types/media';
|
|
6
6
|
import type { Effects } from '../streamEffects/video/esdk/TrackProcessor';
|
|
7
|
+
import type { EncodedVideoStatsSnapshot } from '../encodedVideo/types';
|
|
7
8
|
import DefaultBaseTrack, { type LoggerContext } from './DefaultBaseTrack';
|
|
8
9
|
export type VideoTrackDependenciesParams = BaseTrackDependenciesParams & {
|
|
9
10
|
clientEventEmitter: EnhancedEventEmitter<ClientObserverEvents>;
|
|
@@ -26,6 +27,7 @@ declare class DefaultVideoTrack extends DefaultBaseTrack implements VideoTrack {
|
|
|
26
27
|
setTransformParams(transformParams: object): void;
|
|
27
28
|
setMaxSpatialLayer(spatialLayer: number): Promise<void>;
|
|
28
29
|
getMaxSpatialLayer(): number | undefined;
|
|
30
|
+
getEncodedVideoStats(): EncodedVideoStatsSnapshot | undefined;
|
|
29
31
|
enableEffects(): Promise<void>;
|
|
30
32
|
disableEffects(restoreOriginalTrack?: boolean): Promise<void>;
|
|
31
33
|
publish(params?: VideoTrackPublishParams): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EncodedVideoStatsSnapshot } from '../encodedVideo/types';
|
|
2
|
+
import DefaultVideoTrack from './DefaultVideoTrack';
|
|
3
|
+
/**
|
|
4
|
+
* Screen-share video track produced via WebCodecs over a mediasoup DataProducer; the server reconstructs
|
|
5
|
+
* a normal RTP video producer from the frames. The DataProducer's id equals the server-returned
|
|
6
|
+
* reconstructed producer id, so it doubles as the producer id for pause/resume signaling and for matching
|
|
7
|
+
* the server's key-frame-request MediaEvent.
|
|
8
|
+
*/
|
|
9
|
+
export default class EncodedVideoTrack extends DefaultVideoTrack {
|
|
10
|
+
#private;
|
|
11
|
+
get producerId(): string | undefined;
|
|
12
|
+
get isPublished(): boolean;
|
|
13
|
+
get isPaused(): boolean;
|
|
14
|
+
publish(): Promise<void>;
|
|
15
|
+
stopMediaStreamTrack(): void;
|
|
16
|
+
unpublish(stopTrack?: boolean): Promise<void>;
|
|
17
|
+
pause(): Promise<void>;
|
|
18
|
+
resume(): Promise<void>;
|
|
19
|
+
requestKeyFrame(): void;
|
|
20
|
+
getEncodedVideoStats(): EncodedVideoStatsSnapshot | undefined;
|
|
21
|
+
getMaxSpatialLayer(): number | undefined;
|
|
22
|
+
setMaxSpatialLayer(): Promise<void>;
|
|
23
|
+
enableEffects(): Promise<void>;
|
|
24
|
+
}
|
|
@@ -177,7 +177,7 @@ export type TProducerAppData = AppData & {
|
|
|
177
177
|
};
|
|
178
178
|
export type TConsumerAppData = AppData & object;
|
|
179
179
|
export type DataProducerLabels = "consumers-scores";
|
|
180
|
-
export type PeerDataProducerLabels = "consumers-scores" | "channel-messages-data-producer" | "heart-beater";
|
|
180
|
+
export type PeerDataProducerLabels = "consumers-scores" | "channel-messages-data-producer" | "heart-beater" | "encoded-video";
|
|
181
181
|
export interface RTCIceServer {
|
|
182
182
|
/** List of ICE server URLs (STUN/TURN). */
|
|
183
183
|
urls: string[];
|
package/dist/helpers/media.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare const getSupportedCodecsMimeTypes: (device: Device) => string[];
|
|
|
7
7
|
export declare const isVp9: (codecOrMimeType: string) => boolean;
|
|
8
8
|
export declare const isG711Codec: (codec: AudioCodec) => codec is G711Codec;
|
|
9
9
|
export declare const isTrackLabel: (value: unknown) => value is TrackLabel;
|
|
10
|
+
export declare const supportsEncodedScreenShare: (codec?: string, width?: number, height?: number) => Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { DeviceErrors, TrackLabel, } from './types/common';
|
|
|
13
13
|
export type { ConsumerData, ActivityConfirmationRequiredPayload, AudioEncoderConfig, AvailableMediaDevices, BaseTrackInfo, MediaDeviceAvailability, MediaDeviceAvailabilityReason, ChannelEvent, CreateCameraVideoTrackOptions, CreateCustomAudioOptions, CreateCustomVideoOptions, CreateMicrophoneAudioTrackOptions, CreateScreenMediaOptions, EncoderConfig, InputKind, JoinChannelParams, PayloadOfPublishedMedia, PayloadOfUnpublishedMedia, ProducerData, PeerGroup, PeerInfo, PeerTrackInfo, Role, SubscribeOptions, TransformParams, TrackTransformParams, TrackForceClosedPayload, TrackInboundStats, TrackLabelString, TrackOutboundStats, TransportsStateInfo, VideoEncoderConfig, VideoCodec, PreferredLayersParams, SpatialLayerParams, } from './types/common';
|
|
14
14
|
export type { ChannelStateInconsistentPayload, ClientObserverEvents, IssuesHandler, NetworkScoresUpdatedHandler, ProducePermissionsChangedPayload, } from './types/engine';
|
|
15
15
|
export type { AudioTrack, BaseTrack, InitEffectsSDKParams, Track, VideoTrack, VideoTrackPublishParams, } from './types/media';
|
|
16
|
+
export type { EncodedVideoStatsSnapshot } from './engine/media/encodedVideo/types';
|
|
16
17
|
export type { IceTransportPolicy } from './types/network';
|
|
17
18
|
export type { PeerConsumer } from './types/peerConsumer';
|
|
18
19
|
export type { PeerTrack, PeerTrackObserverEvents } from './types/peerTrack';
|