livekit-client 1.9.1 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +3338 -3037
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts +98 -97
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/connectionHelper/ConnectionCheck.d.ts +25 -24
- package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/Checker.d.ts +58 -58
- package/dist/src/connectionHelper/checks/publishAudio.d.ts +5 -5
- package/dist/src/connectionHelper/checks/publishVideo.d.ts +5 -5
- package/dist/src/connectionHelper/checks/reconnect.d.ts +5 -5
- package/dist/src/connectionHelper/checks/turn.d.ts +5 -5
- package/dist/src/connectionHelper/checks/webrtc.d.ts +5 -5
- package/dist/src/connectionHelper/checks/websocket.d.ts +5 -5
- package/dist/src/index.d.ts +34 -31
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/logger.d.ts +25 -25
- package/dist/src/options.d.ts +98 -98
- package/dist/src/proto/google/protobuf/timestamp.d.ts +145 -145
- package/dist/src/proto/livekit_models.d.ts +2300 -2300
- package/dist/src/proto/livekit_rtc.d.ts +14032 -14032
- package/dist/src/room/DefaultReconnectPolicy.d.ts +7 -7
- package/dist/src/room/DeviceManager.d.ts +8 -8
- package/dist/src/room/PCTransport.d.ts +37 -37
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +126 -120
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/ReconnectPolicy.d.ts +23 -23
- package/dist/src/room/RegionUrlProvider.d.ts +13 -13
- package/dist/src/room/Room.d.ts +232 -229
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts +7 -7
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/errors.d.ts +42 -42
- package/dist/src/room/events.d.ts +455 -455
- package/dist/src/room/participant/LocalParticipant.d.ts +170 -170
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +93 -93
- package/dist/src/room/participant/ParticipantTrackPermission.d.ts +25 -25
- package/dist/src/room/participant/RemoteParticipant.d.ts +52 -51
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts +19 -18
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/stats.d.ts +66 -66
- package/dist/src/room/timers.d.ts +12 -12
- package/dist/src/room/track/LocalAudioTrack.d.ts +24 -24
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +43 -43
- package/dist/src/room/track/LocalTrackPublication.d.ts +37 -37
- package/dist/src/room/track/LocalVideoTrack.d.ts +53 -53
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteAudioTrack.d.ts +52 -52
- package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrack.d.ts +14 -14
- package/dist/src/room/track/RemoteTrackPublication.d.ts +60 -60
- package/dist/src/room/track/RemoteVideoTrack.d.ts +52 -52
- package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +124 -124
- package/dist/src/room/track/TrackPublication.d.ts +67 -67
- package/dist/src/room/track/create.d.ts +23 -23
- package/dist/src/room/track/create.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +255 -247
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/track/types.d.ts +22 -22
- package/dist/src/room/track/utils.d.ts +13 -13
- package/dist/src/room/types.d.ts +25 -25
- package/dist/src/room/utils.d.ts +86 -85
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/test/MockMediaStreamTrack.d.ts +25 -25
- package/dist/src/test/mocks.d.ts +10 -10
- package/dist/src/version.d.ts +2 -2
- package/dist/ts4.2/src/api/SignalClient.d.ts +1 -0
- package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +2 -1
- package/dist/ts4.2/src/index.d.ts +8 -6
- package/dist/ts4.2/src/room/PCTransport.d.ts +1 -1
- package/dist/ts4.2/src/room/RTCEngine.d.ts +7 -1
- package/dist/ts4.2/src/room/Room.d.ts +3 -0
- package/dist/ts4.2/src/room/defaults.d.ts +1 -1
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +4 -4
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -1
- package/dist/ts4.2/src/room/participant/publishUtils.d.ts +2 -1
- package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/create.d.ts +1 -1
- package/dist/ts4.2/src/room/track/options.d.ts +10 -2
- package/dist/ts4.2/src/room/utils.d.ts +1 -0
- package/package.json +12 -12
- package/src/api/SignalClient.ts +19 -16
- package/src/connectionHelper/ConnectionCheck.ts +2 -1
- package/src/index.ts +13 -8
- package/src/room/PCTransport.ts +9 -5
- package/src/room/RTCEngine.ts +44 -4
- package/src/room/Room.ts +87 -42
- package/src/room/defaults.ts +6 -4
- package/src/room/participant/LocalParticipant.ts +10 -9
- package/src/room/participant/RemoteParticipant.ts +2 -1
- package/src/room/participant/publishUtils.ts +7 -5
- package/src/room/track/LocalAudioTrack.ts +2 -1
- package/src/room/track/LocalVideoTrack.ts +3 -2
- package/src/room/track/RemoteAudioTrack.ts +2 -1
- package/src/room/track/RemoteVideoTrack.ts +4 -8
- package/src/room/track/create.ts +2 -2
- package/src/room/track/options.ts +23 -7
- package/src/room/utils.ts +15 -2
@@ -1,171 +1,171 @@
|
|
1
|
-
import 'webrtc-adapter';
|
2
|
-
import type { InternalRoomOptions } from '../../options';
|
3
|
-
import { DataPacket_Kind, ParticipantInfo } from '../../proto/livekit_models';
|
4
|
-
import { DataChannelInfo, TrackPublishedResponse } from '../../proto/livekit_rtc';
|
5
|
-
import type RTCEngine from '../RTCEngine';
|
6
|
-
import LocalTrack from '../track/LocalTrack';
|
7
|
-
import LocalTrackPublication from '../track/LocalTrackPublication';
|
8
|
-
import { Track } from '../track/Track';
|
9
|
-
import { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, ScreenShareCaptureOptions, TrackPublishOptions, VideoCaptureOptions } from '../track/options';
|
10
|
-
import type { DataPublishOptions } from '../types';
|
11
|
-
import Participant from './Participant';
|
12
|
-
import { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
13
|
-
import RemoteParticipant from './RemoteParticipant';
|
14
|
-
export default class LocalParticipant extends Participant {
|
15
|
-
audioTracks: Map<string, LocalTrackPublication>;
|
16
|
-
videoTracks: Map<string, LocalTrackPublication>;
|
17
|
-
/** map of track sid => all published tracks */
|
18
|
-
tracks: Map<string, LocalTrackPublication>;
|
19
|
-
/** @internal */
|
20
|
-
engine: RTCEngine;
|
21
|
-
private pendingPublishing;
|
22
|
-
private pendingPublishPromises;
|
23
|
-
private cameraError;
|
24
|
-
private microphoneError;
|
25
|
-
private participantTrackPermissions;
|
26
|
-
private allParticipantsAllowedToSubscribe;
|
27
|
-
private roomOptions;
|
28
|
-
private reconnectFuture?;
|
29
|
-
/** @internal */
|
30
|
-
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
31
|
-
get lastCameraError(): Error | undefined;
|
32
|
-
get lastMicrophoneError(): Error | undefined;
|
33
|
-
getTrack(source: Track.Source): LocalTrackPublication | undefined;
|
34
|
-
getTrackByName(name: string): LocalTrackPublication | undefined;
|
35
|
-
/**
|
36
|
-
* @internal
|
37
|
-
*/
|
38
|
-
setupEngine(engine: RTCEngine): void;
|
39
|
-
private handleReconnecting;
|
40
|
-
private handleReconnected;
|
41
|
-
private handleDisconnected;
|
42
|
-
/**
|
43
|
-
* Sets and updates the metadata of the local participant.
|
44
|
-
* Note: this requires `
|
45
|
-
* @param metadata
|
46
|
-
*/
|
47
|
-
setMetadata(metadata: string): void;
|
48
|
-
/**
|
49
|
-
* Sets and updates the name of the local participant.
|
50
|
-
* Note: this requires `
|
51
|
-
* @param metadata
|
52
|
-
*/
|
53
|
-
setName(name: string): void;
|
54
|
-
/**
|
55
|
-
* Enable or disable a participant's camera track.
|
56
|
-
*
|
57
|
-
* If a track has already published, it'll mute or unmute the track.
|
58
|
-
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
59
|
-
*/
|
60
|
-
setCameraEnabled(enabled: boolean, options?: VideoCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
61
|
-
/**
|
62
|
-
* Enable or disable a participant's microphone track.
|
63
|
-
*
|
64
|
-
* If a track has already published, it'll mute or unmute the track.
|
65
|
-
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
66
|
-
*/
|
67
|
-
setMicrophoneEnabled(enabled: boolean, options?: AudioCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
68
|
-
/**
|
69
|
-
* Start or stop sharing a participant's screen
|
70
|
-
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
71
|
-
*/
|
72
|
-
setScreenShareEnabled(enabled: boolean, options?: ScreenShareCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
73
|
-
/**
|
74
|
-
* Enable or disable publishing for a track by source. This serves as a simple
|
75
|
-
* way to manage the common tracks (camera, mic, or screen share).
|
76
|
-
* Resolves with LocalTrackPublication if successful and void otherwise
|
77
|
-
*/
|
78
|
-
private setTrackEnabled;
|
79
|
-
/**
|
80
|
-
* Publish both camera and microphone at the same time. This is useful for
|
81
|
-
* displaying a single Permission Dialog box to the end user.
|
82
|
-
*/
|
83
|
-
enableCameraAndMicrophone(): Promise<void>;
|
84
|
-
/**
|
85
|
-
* Create local camera and/or microphone tracks
|
86
|
-
* @param options
|
87
|
-
* @returns
|
88
|
-
*/
|
89
|
-
createTracks(options?: CreateLocalTracksOptions): Promise<LocalTrack[]>;
|
90
|
-
/**
|
91
|
-
* Creates a screen capture tracks with getDisplayMedia().
|
92
|
-
* A LocalVideoTrack is always created and returned.
|
93
|
-
* If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
|
94
|
-
*/
|
95
|
-
createScreenTracks(options?: ScreenShareCaptureOptions): Promise<Array<LocalTrack>>;
|
96
|
-
/**
|
97
|
-
* Publish a new track to the room
|
98
|
-
* @param track
|
99
|
-
* @param options
|
100
|
-
*/
|
101
|
-
publishTrack(track: LocalTrack | MediaStreamTrack, options?: TrackPublishOptions): Promise<LocalTrackPublication>;
|
102
|
-
private publish;
|
103
|
-
get isLocal(): boolean;
|
104
|
-
/** @internal
|
105
|
-
* publish additional codec to existing track
|
106
|
-
*/
|
107
|
-
publishAdditionalCodecForTrack(track: LocalTrack | MediaStreamTrack, videoCodec: BackupVideoCodec, options?: TrackPublishOptions): Promise<void>;
|
108
|
-
unpublishTrack(track: LocalTrack | MediaStreamTrack, stopOnUnpublish?: boolean): Promise<LocalTrackPublication | undefined>;
|
109
|
-
unpublishTracks(tracks: LocalTrack[] | MediaStreamTrack[]): Promise<LocalTrackPublication[]>;
|
110
|
-
republishAllTracks(options?: TrackPublishOptions): Promise<void>;
|
111
|
-
/**
|
112
|
-
* Publish a new data payload to the room. Data will be forwarded to each
|
113
|
-
* participant in the room if the destination field in publishOptions is empty
|
114
|
-
*
|
115
|
-
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
116
|
-
* @param kind whether to send this as reliable or lossy.
|
117
|
-
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
118
|
-
* For data that should arrive as quickly as possible, but you are ok with dropped
|
119
|
-
* packets, use Lossy.
|
120
|
-
* @param publishOptions optionally specify a `topic` and `destination`
|
121
|
-
*/
|
122
|
-
publishData(data: Uint8Array, kind: DataPacket_Kind, publishOptions?: DataPublishOptions): Promise<void>;
|
123
|
-
/**
|
124
|
-
* Publish a new data payload to the room. Data will be forwarded to each
|
125
|
-
* participant in the room if the destination argument is empty
|
126
|
-
*
|
127
|
-
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
128
|
-
* @param kind whether to send this as reliable or lossy.
|
129
|
-
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
130
|
-
* For data that should arrive as quickly as possible, but you are ok with dropped
|
131
|
-
* packets, use Lossy.
|
132
|
-
* @param destination the participants who will receive the message
|
133
|
-
*/
|
134
|
-
publishData(data: Uint8Array, kind: DataPacket_Kind, destination?: RemoteParticipant[] | string[]): Promise<void>;
|
135
|
-
/**
|
136
|
-
* Control who can subscribe to LocalParticipant's published tracks.
|
137
|
-
*
|
138
|
-
* By default, all participants can subscribe. This allows fine-grained control over
|
139
|
-
* who is able to subscribe at a participant and track level.
|
140
|
-
*
|
141
|
-
* Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and
|
142
|
-
* [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks
|
143
|
-
* will not grant permissions to any participants and will require a subsequent
|
144
|
-
* permissions update to allow subscription.
|
145
|
-
*
|
146
|
-
* @param allParticipantsAllowed Allows all participants to subscribe all tracks.
|
147
|
-
* Takes precedence over [[participantTrackPermissions]] if set to true.
|
148
|
-
* By default this is set to true.
|
149
|
-
* @param participantTrackPermissions Full list of individual permissions per
|
150
|
-
* participant/track. Any omitted participants will not receive any permissions.
|
151
|
-
*/
|
152
|
-
setTrackSubscriptionPermissions(allParticipantsAllowed: boolean, participantTrackPermissions?: ParticipantTrackPermission[]): void;
|
153
|
-
/** @internal */
|
154
|
-
updateInfo(info: ParticipantInfo): boolean;
|
155
|
-
private updateTrackSubscriptionPermissions;
|
156
|
-
/** @internal */
|
157
|
-
private onTrackUnmuted;
|
158
|
-
/** @internal */
|
159
|
-
private onTrackMuted;
|
160
|
-
private onTrackUpstreamPaused;
|
161
|
-
private onTrackUpstreamResumed;
|
162
|
-
private handleSubscribedQualityUpdate;
|
163
|
-
private handleLocalTrackUnpublished;
|
164
|
-
private handleTrackEnded;
|
165
|
-
private getPublicationForTrack;
|
166
|
-
/** @internal */
|
167
|
-
publishedTracksInfo(): TrackPublishedResponse[];
|
168
|
-
/** @internal */
|
169
|
-
dataChannelsInfo(): DataChannelInfo[];
|
170
|
-
}
|
1
|
+
import 'webrtc-adapter';
|
2
|
+
import type { InternalRoomOptions } from '../../options';
|
3
|
+
import { DataPacket_Kind, ParticipantInfo } from '../../proto/livekit_models';
|
4
|
+
import { DataChannelInfo, TrackPublishedResponse } from '../../proto/livekit_rtc';
|
5
|
+
import type RTCEngine from '../RTCEngine';
|
6
|
+
import LocalTrack from '../track/LocalTrack';
|
7
|
+
import LocalTrackPublication from '../track/LocalTrackPublication';
|
8
|
+
import { Track } from '../track/Track';
|
9
|
+
import type { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, ScreenShareCaptureOptions, TrackPublishOptions, VideoCaptureOptions } from '../track/options';
|
10
|
+
import type { DataPublishOptions } from '../types';
|
11
|
+
import Participant from './Participant';
|
12
|
+
import type { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
13
|
+
import RemoteParticipant from './RemoteParticipant';
|
14
|
+
export default class LocalParticipant extends Participant {
|
15
|
+
audioTracks: Map<string, LocalTrackPublication>;
|
16
|
+
videoTracks: Map<string, LocalTrackPublication>;
|
17
|
+
/** map of track sid => all published tracks */
|
18
|
+
tracks: Map<string, LocalTrackPublication>;
|
19
|
+
/** @internal */
|
20
|
+
engine: RTCEngine;
|
21
|
+
private pendingPublishing;
|
22
|
+
private pendingPublishPromises;
|
23
|
+
private cameraError;
|
24
|
+
private microphoneError;
|
25
|
+
private participantTrackPermissions;
|
26
|
+
private allParticipantsAllowedToSubscribe;
|
27
|
+
private roomOptions;
|
28
|
+
private reconnectFuture?;
|
29
|
+
/** @internal */
|
30
|
+
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
31
|
+
get lastCameraError(): Error | undefined;
|
32
|
+
get lastMicrophoneError(): Error | undefined;
|
33
|
+
getTrack(source: Track.Source): LocalTrackPublication | undefined;
|
34
|
+
getTrackByName(name: string): LocalTrackPublication | undefined;
|
35
|
+
/**
|
36
|
+
* @internal
|
37
|
+
*/
|
38
|
+
setupEngine(engine: RTCEngine): void;
|
39
|
+
private handleReconnecting;
|
40
|
+
private handleReconnected;
|
41
|
+
private handleDisconnected;
|
42
|
+
/**
|
43
|
+
* Sets and updates the metadata of the local participant.
|
44
|
+
* Note: this requires `canUpdateOwnMetadata` permission encoded in the token.
|
45
|
+
* @param metadata
|
46
|
+
*/
|
47
|
+
setMetadata(metadata: string): void;
|
48
|
+
/**
|
49
|
+
* Sets and updates the name of the local participant.
|
50
|
+
* Note: this requires `canUpdateOwnMetadata` permission encoded in the token.
|
51
|
+
* @param metadata
|
52
|
+
*/
|
53
|
+
setName(name: string): void;
|
54
|
+
/**
|
55
|
+
* Enable or disable a participant's camera track.
|
56
|
+
*
|
57
|
+
* If a track has already published, it'll mute or unmute the track.
|
58
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
59
|
+
*/
|
60
|
+
setCameraEnabled(enabled: boolean, options?: VideoCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
61
|
+
/**
|
62
|
+
* Enable or disable a participant's microphone track.
|
63
|
+
*
|
64
|
+
* If a track has already published, it'll mute or unmute the track.
|
65
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
66
|
+
*/
|
67
|
+
setMicrophoneEnabled(enabled: boolean, options?: AudioCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
68
|
+
/**
|
69
|
+
* Start or stop sharing a participant's screen
|
70
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
71
|
+
*/
|
72
|
+
setScreenShareEnabled(enabled: boolean, options?: ScreenShareCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
73
|
+
/**
|
74
|
+
* Enable or disable publishing for a track by source. This serves as a simple
|
75
|
+
* way to manage the common tracks (camera, mic, or screen share).
|
76
|
+
* Resolves with LocalTrackPublication if successful and void otherwise
|
77
|
+
*/
|
78
|
+
private setTrackEnabled;
|
79
|
+
/**
|
80
|
+
* Publish both camera and microphone at the same time. This is useful for
|
81
|
+
* displaying a single Permission Dialog box to the end user.
|
82
|
+
*/
|
83
|
+
enableCameraAndMicrophone(): Promise<void>;
|
84
|
+
/**
|
85
|
+
* Create local camera and/or microphone tracks
|
86
|
+
* @param options
|
87
|
+
* @returns
|
88
|
+
*/
|
89
|
+
createTracks(options?: CreateLocalTracksOptions): Promise<LocalTrack[]>;
|
90
|
+
/**
|
91
|
+
* Creates a screen capture tracks with getDisplayMedia().
|
92
|
+
* A LocalVideoTrack is always created and returned.
|
93
|
+
* If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
|
94
|
+
*/
|
95
|
+
createScreenTracks(options?: ScreenShareCaptureOptions): Promise<Array<LocalTrack>>;
|
96
|
+
/**
|
97
|
+
* Publish a new track to the room
|
98
|
+
* @param track
|
99
|
+
* @param options
|
100
|
+
*/
|
101
|
+
publishTrack(track: LocalTrack | MediaStreamTrack, options?: TrackPublishOptions): Promise<LocalTrackPublication>;
|
102
|
+
private publish;
|
103
|
+
get isLocal(): boolean;
|
104
|
+
/** @internal
|
105
|
+
* publish additional codec to existing track
|
106
|
+
*/
|
107
|
+
publishAdditionalCodecForTrack(track: LocalTrack | MediaStreamTrack, videoCodec: BackupVideoCodec, options?: TrackPublishOptions): Promise<void>;
|
108
|
+
unpublishTrack(track: LocalTrack | MediaStreamTrack, stopOnUnpublish?: boolean): Promise<LocalTrackPublication | undefined>;
|
109
|
+
unpublishTracks(tracks: LocalTrack[] | MediaStreamTrack[]): Promise<LocalTrackPublication[]>;
|
110
|
+
republishAllTracks(options?: TrackPublishOptions): Promise<void>;
|
111
|
+
/**
|
112
|
+
* Publish a new data payload to the room. Data will be forwarded to each
|
113
|
+
* participant in the room if the destination field in publishOptions is empty
|
114
|
+
*
|
115
|
+
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
116
|
+
* @param kind whether to send this as reliable or lossy.
|
117
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
118
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
119
|
+
* packets, use Lossy.
|
120
|
+
* @param publishOptions optionally specify a `topic` and `destination`
|
121
|
+
*/
|
122
|
+
publishData(data: Uint8Array, kind: DataPacket_Kind, publishOptions?: DataPublishOptions): Promise<void>;
|
123
|
+
/**
|
124
|
+
* Publish a new data payload to the room. Data will be forwarded to each
|
125
|
+
* participant in the room if the destination argument is empty
|
126
|
+
*
|
127
|
+
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
128
|
+
* @param kind whether to send this as reliable or lossy.
|
129
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
130
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
131
|
+
* packets, use Lossy.
|
132
|
+
* @param destination the participants who will receive the message
|
133
|
+
*/
|
134
|
+
publishData(data: Uint8Array, kind: DataPacket_Kind, destination?: RemoteParticipant[] | string[]): Promise<void>;
|
135
|
+
/**
|
136
|
+
* Control who can subscribe to LocalParticipant's published tracks.
|
137
|
+
*
|
138
|
+
* By default, all participants can subscribe. This allows fine-grained control over
|
139
|
+
* who is able to subscribe at a participant and track level.
|
140
|
+
*
|
141
|
+
* Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and
|
142
|
+
* [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks
|
143
|
+
* will not grant permissions to any participants and will require a subsequent
|
144
|
+
* permissions update to allow subscription.
|
145
|
+
*
|
146
|
+
* @param allParticipantsAllowed Allows all participants to subscribe all tracks.
|
147
|
+
* Takes precedence over [[participantTrackPermissions]] if set to true.
|
148
|
+
* By default this is set to true.
|
149
|
+
* @param participantTrackPermissions Full list of individual permissions per
|
150
|
+
* participant/track. Any omitted participants will not receive any permissions.
|
151
|
+
*/
|
152
|
+
setTrackSubscriptionPermissions(allParticipantsAllowed: boolean, participantTrackPermissions?: ParticipantTrackPermission[]): void;
|
153
|
+
/** @internal */
|
154
|
+
updateInfo(info: ParticipantInfo): boolean;
|
155
|
+
private updateTrackSubscriptionPermissions;
|
156
|
+
/** @internal */
|
157
|
+
private onTrackUnmuted;
|
158
|
+
/** @internal */
|
159
|
+
private onTrackMuted;
|
160
|
+
private onTrackUpstreamPaused;
|
161
|
+
private onTrackUpstreamResumed;
|
162
|
+
private handleSubscribedQualityUpdate;
|
163
|
+
private handleLocalTrackUnpublished;
|
164
|
+
private handleTrackEnded;
|
165
|
+
private getPublicationForTrack;
|
166
|
+
/** @internal */
|
167
|
+
publishedTracksInfo(): TrackPublishedResponse[];
|
168
|
+
/** @internal */
|
169
|
+
dataChannelsInfo(): DataChannelInfo[];
|
170
|
+
}
|
171
171
|
//# sourceMappingURL=LocalParticipant.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAc,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAEL,eAAe,EAGf,sBAAsB,EAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAI1C,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":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;;;OAgBG;IACH,+BAA+B,CAC7B,sBAAsB,EAAE,OAAO,EAC/B,2BAA2B,GAAE,0BAA0B,EAAO;IAShE,gBAAgB;IAChB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO;IA8B1C,OAAO,CAAC,kCAAkC,CASxC;IAEF,gBAAgB;IAChB,OAAO,CAAC,cAAc,CAEpB;IAGF,gBAAgB;IAChB,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,qBAAqB,CAG3B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,6BAA6B,CA0BnC;IAEF,OAAO,CAAC,2BAA2B,CAUjC;IAEF,OAAO,CAAC,gBAAgB,CA+CtB;IAEF,OAAO,CAAC,sBAAsB;IAwB9B,gBAAgB;IAChB,mBAAmB,IAAI,sBAAsB,EAAE;IAa/C,gBAAgB;IAChB,gBAAgB,IAAI,eAAe,EAAE;CAoBtC"}
|
@@ -1,94 +1,94 @@
|
|
1
|
-
import type TypedEmitter from 'typed-emitter';
|
2
|
-
import { DataPacket_Kind, ParticipantInfo, ParticipantPermission, ConnectionQuality as ProtoQuality } from '../../proto/livekit_models';
|
3
|
-
import type LocalTrackPublication from '../track/LocalTrackPublication';
|
4
|
-
import type RemoteTrack from '../track/RemoteTrack';
|
5
|
-
import type RemoteTrackPublication from '../track/RemoteTrackPublication';
|
6
|
-
import { Track } from '../track/Track';
|
7
|
-
import type { TrackPublication } from '../track/TrackPublication';
|
8
|
-
export declare enum ConnectionQuality {
|
9
|
-
Excellent = "excellent",
|
10
|
-
Good = "good",
|
11
|
-
Poor = "poor",
|
12
|
-
Unknown = "unknown"
|
13
|
-
}
|
14
|
-
declare const Participant_base: new () => TypedEmitter<ParticipantEventCallbacks>;
|
15
|
-
export default class Participant extends Participant_base {
|
16
|
-
protected participantInfo?: ParticipantInfo;
|
17
|
-
audioTracks: Map<string, TrackPublication>;
|
18
|
-
videoTracks: Map<string, TrackPublication>;
|
19
|
-
/** map of track sid => all published tracks */
|
20
|
-
tracks: Map<string, TrackPublication>;
|
21
|
-
/** audio level between 0-1.0, 1 being loudest, 0 being softest */
|
22
|
-
audioLevel: number;
|
23
|
-
/** if participant is currently speaking */
|
24
|
-
isSpeaking: boolean;
|
25
|
-
/** server assigned unique id */
|
26
|
-
sid: string;
|
27
|
-
/** client assigned identity, encoded in JWT token */
|
28
|
-
identity: string;
|
29
|
-
/** client assigned display name, encoded in JWT token */
|
30
|
-
name?: string;
|
31
|
-
/** client metadata, opaque to livekit */
|
32
|
-
metadata?: string;
|
33
|
-
lastSpokeAt?: Date | undefined;
|
34
|
-
permissions?: ParticipantPermission;
|
35
|
-
private _connectionQuality;
|
36
|
-
/** @internal */
|
37
|
-
constructor(sid: string, identity: string, name?: string, metadata?: string);
|
38
|
-
getTracks(): TrackPublication[];
|
39
|
-
/**
|
40
|
-
* Finds the first track that matches the source filter, for example, getting
|
41
|
-
* the user's camera track with getTrackBySource(Track.Source.Camera).
|
42
|
-
* @param source
|
43
|
-
* @returns
|
44
|
-
*/
|
45
|
-
getTrack(source: Track.Source): TrackPublication | undefined;
|
46
|
-
/**
|
47
|
-
* Finds the first track that matches the track's name.
|
48
|
-
* @param name
|
49
|
-
* @returns
|
50
|
-
*/
|
51
|
-
getTrackByName(name: string): TrackPublication | undefined;
|
52
|
-
get connectionQuality(): ConnectionQuality;
|
53
|
-
get isCameraEnabled(): boolean;
|
54
|
-
get isMicrophoneEnabled(): boolean;
|
55
|
-
get isScreenShareEnabled(): boolean;
|
56
|
-
get isLocal(): boolean;
|
57
|
-
/** when participant joined the room */
|
58
|
-
get joinedAt(): Date | undefined;
|
59
|
-
/** @internal */
|
60
|
-
updateInfo(info: ParticipantInfo): boolean;
|
61
|
-
/** @internal */
|
62
|
-
setMetadata(md: string): void;
|
63
|
-
protected setName(name: string): void;
|
64
|
-
/** @internal */
|
65
|
-
setPermissions(permissions: ParticipantPermission): boolean;
|
66
|
-
/** @internal */
|
67
|
-
setIsSpeaking(speaking: boolean): void;
|
68
|
-
/** @internal */
|
69
|
-
setConnectionQuality(q: ProtoQuality): void;
|
70
|
-
protected addTrackPublication(publication: TrackPublication): void;
|
71
|
-
}
|
72
|
-
export type ParticipantEventCallbacks = {
|
73
|
-
trackPublished: (publication: RemoteTrackPublication) => void;
|
74
|
-
trackSubscribed: (track: RemoteTrack, publication: RemoteTrackPublication) => void;
|
75
|
-
trackSubscriptionFailed: (trackSid: string) => void;
|
76
|
-
trackUnpublished: (publication: RemoteTrackPublication) => void;
|
77
|
-
trackUnsubscribed: (track: RemoteTrack, publication: RemoteTrackPublication) => void;
|
78
|
-
trackMuted: (publication: TrackPublication) => void;
|
79
|
-
trackUnmuted: (publication: TrackPublication) => void;
|
80
|
-
localTrackPublished: (publication: LocalTrackPublication) => void;
|
81
|
-
localTrackUnpublished: (publication: LocalTrackPublication) => void;
|
82
|
-
participantMetadataChanged: (prevMetadata: string | undefined, participant?: any) => void;
|
83
|
-
participantNameChanged: (name: string) => void;
|
84
|
-
dataReceived: (payload: Uint8Array, kind: DataPacket_Kind) => void;
|
85
|
-
isSpeakingChanged: (speaking: boolean) => void;
|
86
|
-
connectionQualityChanged: (connectionQuality: ConnectionQuality) => void;
|
87
|
-
trackStreamStateChanged: (publication: RemoteTrackPublication, streamState: Track.StreamState) => void;
|
88
|
-
trackSubscriptionPermissionChanged: (publication: RemoteTrackPublication, status: TrackPublication.PermissionStatus) => void;
|
89
|
-
mediaDevicesError: (error: Error) => void;
|
90
|
-
participantPermissionsChanged: (prevPermissions?: ParticipantPermission) => void;
|
91
|
-
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus) => void;
|
92
|
-
};
|
93
|
-
export {};
|
1
|
+
import type TypedEmitter from 'typed-emitter';
|
2
|
+
import { DataPacket_Kind, ParticipantInfo, ParticipantPermission, ConnectionQuality as ProtoQuality } from '../../proto/livekit_models';
|
3
|
+
import type LocalTrackPublication from '../track/LocalTrackPublication';
|
4
|
+
import type RemoteTrack from '../track/RemoteTrack';
|
5
|
+
import type RemoteTrackPublication from '../track/RemoteTrackPublication';
|
6
|
+
import { Track } from '../track/Track';
|
7
|
+
import type { TrackPublication } from '../track/TrackPublication';
|
8
|
+
export declare enum ConnectionQuality {
|
9
|
+
Excellent = "excellent",
|
10
|
+
Good = "good",
|
11
|
+
Poor = "poor",
|
12
|
+
Unknown = "unknown"
|
13
|
+
}
|
14
|
+
declare const Participant_base: new () => TypedEmitter<ParticipantEventCallbacks>;
|
15
|
+
export default class Participant extends Participant_base {
|
16
|
+
protected participantInfo?: ParticipantInfo;
|
17
|
+
audioTracks: Map<string, TrackPublication>;
|
18
|
+
videoTracks: Map<string, TrackPublication>;
|
19
|
+
/** map of track sid => all published tracks */
|
20
|
+
tracks: Map<string, TrackPublication>;
|
21
|
+
/** audio level between 0-1.0, 1 being loudest, 0 being softest */
|
22
|
+
audioLevel: number;
|
23
|
+
/** if participant is currently speaking */
|
24
|
+
isSpeaking: boolean;
|
25
|
+
/** server assigned unique id */
|
26
|
+
sid: string;
|
27
|
+
/** client assigned identity, encoded in JWT token */
|
28
|
+
identity: string;
|
29
|
+
/** client assigned display name, encoded in JWT token */
|
30
|
+
name?: string;
|
31
|
+
/** client metadata, opaque to livekit */
|
32
|
+
metadata?: string;
|
33
|
+
lastSpokeAt?: Date | undefined;
|
34
|
+
permissions?: ParticipantPermission;
|
35
|
+
private _connectionQuality;
|
36
|
+
/** @internal */
|
37
|
+
constructor(sid: string, identity: string, name?: string, metadata?: string);
|
38
|
+
getTracks(): TrackPublication[];
|
39
|
+
/**
|
40
|
+
* Finds the first track that matches the source filter, for example, getting
|
41
|
+
* the user's camera track with getTrackBySource(Track.Source.Camera).
|
42
|
+
* @param source
|
43
|
+
* @returns
|
44
|
+
*/
|
45
|
+
getTrack(source: Track.Source): TrackPublication | undefined;
|
46
|
+
/**
|
47
|
+
* Finds the first track that matches the track's name.
|
48
|
+
* @param name
|
49
|
+
* @returns
|
50
|
+
*/
|
51
|
+
getTrackByName(name: string): TrackPublication | undefined;
|
52
|
+
get connectionQuality(): ConnectionQuality;
|
53
|
+
get isCameraEnabled(): boolean;
|
54
|
+
get isMicrophoneEnabled(): boolean;
|
55
|
+
get isScreenShareEnabled(): boolean;
|
56
|
+
get isLocal(): boolean;
|
57
|
+
/** when participant joined the room */
|
58
|
+
get joinedAt(): Date | undefined;
|
59
|
+
/** @internal */
|
60
|
+
updateInfo(info: ParticipantInfo): boolean;
|
61
|
+
/** @internal */
|
62
|
+
setMetadata(md: string): void;
|
63
|
+
protected setName(name: string): void;
|
64
|
+
/** @internal */
|
65
|
+
setPermissions(permissions: ParticipantPermission): boolean;
|
66
|
+
/** @internal */
|
67
|
+
setIsSpeaking(speaking: boolean): void;
|
68
|
+
/** @internal */
|
69
|
+
setConnectionQuality(q: ProtoQuality): void;
|
70
|
+
protected addTrackPublication(publication: TrackPublication): void;
|
71
|
+
}
|
72
|
+
export type ParticipantEventCallbacks = {
|
73
|
+
trackPublished: (publication: RemoteTrackPublication) => void;
|
74
|
+
trackSubscribed: (track: RemoteTrack, publication: RemoteTrackPublication) => void;
|
75
|
+
trackSubscriptionFailed: (trackSid: string) => void;
|
76
|
+
trackUnpublished: (publication: RemoteTrackPublication) => void;
|
77
|
+
trackUnsubscribed: (track: RemoteTrack, publication: RemoteTrackPublication) => void;
|
78
|
+
trackMuted: (publication: TrackPublication) => void;
|
79
|
+
trackUnmuted: (publication: TrackPublication) => void;
|
80
|
+
localTrackPublished: (publication: LocalTrackPublication) => void;
|
81
|
+
localTrackUnpublished: (publication: LocalTrackPublication) => void;
|
82
|
+
participantMetadataChanged: (prevMetadata: string | undefined, participant?: any) => void;
|
83
|
+
participantNameChanged: (name: string) => void;
|
84
|
+
dataReceived: (payload: Uint8Array, kind: DataPacket_Kind) => void;
|
85
|
+
isSpeakingChanged: (speaking: boolean) => void;
|
86
|
+
connectionQualityChanged: (connectionQuality: ConnectionQuality) => void;
|
87
|
+
trackStreamStateChanged: (publication: RemoteTrackPublication, streamState: Track.StreamState) => void;
|
88
|
+
trackSubscriptionPermissionChanged: (publication: RemoteTrackPublication, status: TrackPublication.PermissionStatus) => void;
|
89
|
+
mediaDevicesError: (error: Error) => void;
|
90
|
+
participantPermissionsChanged: (prevPermissions?: ParticipantPermission) => void;
|
91
|
+
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus) => void;
|
92
|
+
};
|
93
|
+
export {};
|
94
94
|
//# sourceMappingURL=Participant.d.ts.map
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import type { TrackPermission } from '../../proto/livekit_rtc';
|
2
|
-
export interface ParticipantTrackPermission {
|
3
|
-
/**
|
4
|
-
* The participant identity this permission applies to.
|
5
|
-
* You can either provide this or `participantSid`
|
6
|
-
*/
|
7
|
-
participantIdentity?: string;
|
8
|
-
/**
|
9
|
-
* The participant server id this permission applies to.
|
10
|
-
* You can either provide this or `participantIdentity`
|
11
|
-
*/
|
12
|
-
participantSid?: string;
|
13
|
-
/**
|
14
|
-
* Grant permission to all all tracks. Takes precedence over allowedTrackSids.
|
15
|
-
* false if unset.
|
16
|
-
*/
|
17
|
-
allowAll?: boolean;
|
18
|
-
/**
|
19
|
-
* The list of track ids that the target participant can subscribe to.
|
20
|
-
* When unset, it'll allow all tracks to be subscribed by the participant.
|
21
|
-
* When empty, this participant is disallowed from subscribing to any tracks.
|
22
|
-
*/
|
23
|
-
allowedTrackSids?: string[];
|
24
|
-
}
|
25
|
-
export declare function trackPermissionToProto(perms: ParticipantTrackPermission): TrackPermission;
|
1
|
+
import type { TrackPermission } from '../../proto/livekit_rtc';
|
2
|
+
export interface ParticipantTrackPermission {
|
3
|
+
/**
|
4
|
+
* The participant identity this permission applies to.
|
5
|
+
* You can either provide this or `participantSid`
|
6
|
+
*/
|
7
|
+
participantIdentity?: string;
|
8
|
+
/**
|
9
|
+
* The participant server id this permission applies to.
|
10
|
+
* You can either provide this or `participantIdentity`
|
11
|
+
*/
|
12
|
+
participantSid?: string;
|
13
|
+
/**
|
14
|
+
* Grant permission to all all tracks. Takes precedence over allowedTrackSids.
|
15
|
+
* false if unset.
|
16
|
+
*/
|
17
|
+
allowAll?: boolean;
|
18
|
+
/**
|
19
|
+
* The list of track ids that the target participant can subscribe to.
|
20
|
+
* When unset, it'll allow all tracks to be subscribed by the participant.
|
21
|
+
* When empty, this participant is disallowed from subscribing to any tracks.
|
22
|
+
*/
|
23
|
+
allowedTrackSids?: string[];
|
24
|
+
}
|
25
|
+
export declare function trackPermissionToProto(perms: ParticipantTrackPermission): TrackPermission;
|
26
26
|
//# sourceMappingURL=ParticipantTrackPermission.d.ts.map
|