@fishjam-cloud/ts-client 0.26.0-rc.0 → 0.26.0
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/index.d.mts +10 -7
- package/dist/index.mjs +1 -1
- package/dist/index.react-native.mjs +3 -3
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import TypedEmitter from 'typed-emitter';
|
|
|
4
4
|
declare const AUTH_ERROR_REASONS: readonly ["missing token", "invalid token", "expired token", "room not found", "peer not found"];
|
|
5
5
|
type AuthErrorReason = (typeof AUTH_ERROR_REASONS)[number];
|
|
6
6
|
declare const isAuthError: (error: string) => error is AuthErrorReason;
|
|
7
|
+
declare const normalizeCloseReason: (reason: string) => string;
|
|
7
8
|
|
|
8
9
|
declare class TrackTypeError extends Error {
|
|
9
10
|
constructor();
|
|
@@ -673,10 +674,8 @@ declare class WebRTCEndpoint extends WebRTCEndpoint_base {
|
|
|
673
674
|
* @param trackMetadata - Any information about this track that other endpoints will
|
|
674
675
|
* receive in {@link WebRTCEndpointEvents.endpointAdded}. E.g. this can source of the track - whether it's
|
|
675
676
|
* screensharing, webcam or some other media device.
|
|
676
|
-
* @param
|
|
677
|
-
*
|
|
678
|
-
* manual track selection support is added. For more information refer to {@link SimulcastConfig}.
|
|
679
|
-
* @param _maxBandwidth - maximal bandwidth this track can use. **Currently processed with a threshold check**:
|
|
677
|
+
* @param simulcastConfig - Simulcast configuration. For more information refer to {@link SimulcastConfig}.
|
|
678
|
+
* @param maxBandwidth - maximal bandwidth this track can use. **Currently processed with a threshold check**:
|
|
680
679
|
* if the value is a positive number, it will be used; otherwise, it defaults to 0 (unlimited).
|
|
681
680
|
* This option has no effect for simulcast and audio tracks.
|
|
682
681
|
* For simulcast tracks use `{@link WebRTCEndpoint.setTrackBandwidth}.
|
|
@@ -711,7 +710,7 @@ declare class WebRTCEndpoint extends WebRTCEndpoint_base {
|
|
|
711
710
|
* .forEach((track) => webrtc.addTrack(track, localStream));
|
|
712
711
|
* ```
|
|
713
712
|
*/
|
|
714
|
-
addTrack(track: MediaStreamTrack, trackMetadata?: unknown,
|
|
713
|
+
addTrack(track: MediaStreamTrack, trackMetadata?: unknown, simulcastConfig?: MediaEvent_Track_SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, stream?: MediaStream): Promise<string>;
|
|
715
714
|
/**
|
|
716
715
|
* Replaces a track that is being sent to the RTC Engine.
|
|
717
716
|
* @param trackId - Audio or video track.
|
|
@@ -934,7 +933,7 @@ declare class WebRTCEndpoint extends WebRTCEndpoint_base {
|
|
|
934
933
|
private onIceConnectionStateChange;
|
|
935
934
|
}
|
|
936
935
|
|
|
937
|
-
declare const JOIN_ERRORS: readonly ["reached peers limit", "room not found", "node not found", "
|
|
936
|
+
declare const JOIN_ERRORS: readonly ["reached peers limit", "room not found", "node not found", "invalid sdk version"];
|
|
938
937
|
type JoinErrorReason = (typeof JOIN_ERRORS)[number];
|
|
939
938
|
declare const isJoinError: (error: string) => error is JoinErrorReason;
|
|
940
939
|
|
|
@@ -1112,6 +1111,7 @@ type MessageEvents<P, S> = {
|
|
|
1112
1111
|
* by the server. It's measured in bits per second.
|
|
1113
1112
|
*/
|
|
1114
1113
|
bandwidthEstimationChanged: (estimation: bigint) => void;
|
|
1114
|
+
encodingChanged: TrackContextEvents['encodingChanged'];
|
|
1115
1115
|
targetTrackEncodingRequested: (event: Parameters<WebRTCEndpointEvents['targetTrackEncodingRequested']>[0]) => void;
|
|
1116
1116
|
localTrackAdded: (event: Parameters<WebRTCEndpointEvents['localTrackAdded']>[0]) => void;
|
|
1117
1117
|
localTrackRemoved: (event: Parameters<WebRTCEndpointEvents['localTrackRemoved']>[0]) => void;
|
|
@@ -1208,6 +1208,9 @@ declare class FishjamClient<PeerMetadata = GenericMetadata, ServerMetadata = Gen
|
|
|
1208
1208
|
private reconnectManager;
|
|
1209
1209
|
private peerMessageQueue;
|
|
1210
1210
|
private sendStatisticsInterval;
|
|
1211
|
+
private cameraStream;
|
|
1212
|
+
private screenShareStream;
|
|
1213
|
+
private trackIdToTrack;
|
|
1211
1214
|
constructor(config?: CreateConfig);
|
|
1212
1215
|
/**
|
|
1213
1216
|
* Uses the WebSocket connection and {@link !WebRTCEndpoint | WebRTCEndpoint} to join to the room. Registers the callbacks to
|
|
@@ -1630,4 +1633,4 @@ type LivestreamCallbacks = {
|
|
|
1630
1633
|
declare function receiveLivestream(url: string, token?: string, callbacks?: LivestreamCallbacks): Promise<ReceiveLivestreamResult>;
|
|
1631
1634
|
declare function publishLivestream(stream: MediaStream, url: string, token: string, callbacks?: LivestreamCallbacks): Promise<PublishLivestreamResult>;
|
|
1632
1635
|
|
|
1633
|
-
export { AUTH_ERROR_REASONS, type AuthErrorReason, type BandwidthLimit, type ClientType, type Component, type ConnectConfig, type CreateConfig, type DataCallback, type DataChannelMessagePayload, type DataChannelOptions, type DataChannelType, type EncodingReason, type Endpoint, FishjamClient, type FishjamTrackContext, type GenericMetadata, JOIN_ERRORS, type JoinErrorReason, type LivestreamCallbacks, LivestreamError, type Logger, type MediaEvent, type MessageEvents, type Metadata, type Peer, type PublishLivestreamResult, type ReceiveLivestreamResult, type ReconnectConfig, type ReconnectionStatus, type SerializedMediaEvent, type SimulcastBandwidthLimit, MediaEvent_Track_SimulcastConfig as SimulcastConfig, type TrackBandwidthLimit, type TrackContext, type TrackContextEvents, type TrackKind, type TrackMetadata, TrackTypeError, type VadStatus, Variant, WebRTCEndpoint, type WebRTCEndpointEvents, getLogger, isAuthError, isJoinError, publishLivestream, receiveLivestream };
|
|
1636
|
+
export { AUTH_ERROR_REASONS, type AuthErrorReason, type BandwidthLimit, type ClientType, type Component, type ConnectConfig, type CreateConfig, type DataCallback, type DataChannelMessagePayload, type DataChannelOptions, type DataChannelType, type EncodingReason, type Endpoint, FishjamClient, type FishjamTrackContext, type GenericMetadata, JOIN_ERRORS, type JoinErrorReason, type LivestreamCallbacks, LivestreamError, type Logger, type MediaEvent, type MessageEvents, type Metadata, type Peer, type PublishLivestreamResult, type ReceiveLivestreamResult, type ReconnectConfig, type ReconnectionStatus, type SerializedMediaEvent, type SimulcastBandwidthLimit, MediaEvent_Track_SimulcastConfig as SimulcastConfig, type TrackBandwidthLimit, type TrackContext, type TrackContextEvents, type TrackKind, type TrackMetadata, TrackTypeError, type VadStatus, Variant, WebRTCEndpoint, type WebRTCEndpointEvents, getLogger, isAuthError, isJoinError, normalizeCloseReason, publishLivestream, receiveLivestream };
|