livekit-client 1.9.2 → 1.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/livekit-client.esm.mjs +3251 -3013
  2. package/dist/livekit-client.esm.mjs.map +1 -1
  3. package/dist/livekit-client.umd.js +1 -1
  4. package/dist/livekit-client.umd.js.map +1 -1
  5. package/dist/src/api/SignalClient.d.ts +98 -98
  6. package/dist/src/api/SignalClient.d.ts.map +1 -1
  7. package/dist/src/connectionHelper/ConnectionCheck.d.ts +25 -24
  8. package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  9. package/dist/src/connectionHelper/checks/Checker.d.ts +58 -58
  10. package/dist/src/connectionHelper/checks/publishAudio.d.ts +5 -5
  11. package/dist/src/connectionHelper/checks/publishVideo.d.ts +5 -5
  12. package/dist/src/connectionHelper/checks/reconnect.d.ts +5 -5
  13. package/dist/src/connectionHelper/checks/turn.d.ts +5 -5
  14. package/dist/src/connectionHelper/checks/webrtc.d.ts +5 -5
  15. package/dist/src/connectionHelper/checks/websocket.d.ts +5 -5
  16. package/dist/src/index.d.ts +34 -31
  17. package/dist/src/index.d.ts.map +1 -1
  18. package/dist/src/logger.d.ts +25 -25
  19. package/dist/src/options.d.ts +98 -98
  20. package/dist/src/proto/google/protobuf/timestamp.d.ts +145 -145
  21. package/dist/src/proto/livekit_models.d.ts +2300 -2300
  22. package/dist/src/proto/livekit_rtc.d.ts +14032 -14032
  23. package/dist/src/room/DefaultReconnectPolicy.d.ts +7 -7
  24. package/dist/src/room/DeviceManager.d.ts +8 -8
  25. package/dist/src/room/PCTransport.d.ts +37 -37
  26. package/dist/src/room/PCTransport.d.ts.map +1 -1
  27. package/dist/src/room/RTCEngine.d.ts +126 -121
  28. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  29. package/dist/src/room/ReconnectPolicy.d.ts +23 -23
  30. package/dist/src/room/RegionUrlProvider.d.ts +13 -13
  31. package/dist/src/room/Room.d.ts +232 -232
  32. package/dist/src/room/defaults.d.ts +7 -7
  33. package/dist/src/room/defaults.d.ts.map +1 -1
  34. package/dist/src/room/errors.d.ts +42 -42
  35. package/dist/src/room/events.d.ts +455 -455
  36. package/dist/src/room/participant/LocalParticipant.d.ts +170 -170
  37. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  38. package/dist/src/room/participant/Participant.d.ts +93 -93
  39. package/dist/src/room/participant/ParticipantTrackPermission.d.ts +25 -25
  40. package/dist/src/room/participant/RemoteParticipant.d.ts +52 -51
  41. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  42. package/dist/src/room/participant/publishUtils.d.ts +19 -18
  43. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  44. package/dist/src/room/stats.d.ts +66 -66
  45. package/dist/src/room/timers.d.ts +12 -12
  46. package/dist/src/room/track/LocalAudioTrack.d.ts +24 -24
  47. package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
  48. package/dist/src/room/track/LocalTrack.d.ts +43 -43
  49. package/dist/src/room/track/LocalTrackPublication.d.ts +37 -37
  50. package/dist/src/room/track/LocalVideoTrack.d.ts +53 -53
  51. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  52. package/dist/src/room/track/RemoteAudioTrack.d.ts +52 -52
  53. package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
  54. package/dist/src/room/track/RemoteTrack.d.ts +14 -14
  55. package/dist/src/room/track/RemoteTrackPublication.d.ts +60 -60
  56. package/dist/src/room/track/RemoteVideoTrack.d.ts +52 -52
  57. package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
  58. package/dist/src/room/track/Track.d.ts +124 -124
  59. package/dist/src/room/track/TrackPublication.d.ts +67 -67
  60. package/dist/src/room/track/create.d.ts +23 -23
  61. package/dist/src/room/track/create.d.ts.map +1 -1
  62. package/dist/src/room/track/options.d.ts +255 -247
  63. package/dist/src/room/track/options.d.ts.map +1 -1
  64. package/dist/src/room/track/types.d.ts +22 -22
  65. package/dist/src/room/track/utils.d.ts +13 -13
  66. package/dist/src/room/types.d.ts +25 -25
  67. package/dist/src/room/utils.d.ts +86 -85
  68. package/dist/src/room/utils.d.ts.map +1 -1
  69. package/dist/src/test/MockMediaStreamTrack.d.ts +25 -25
  70. package/dist/src/test/mocks.d.ts +10 -10
  71. package/dist/src/version.d.ts +2 -2
  72. package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +2 -1
  73. package/dist/ts4.2/src/index.d.ts +8 -6
  74. package/dist/ts4.2/src/room/PCTransport.d.ts +1 -1
  75. package/dist/ts4.2/src/room/RTCEngine.d.ts +6 -1
  76. package/dist/ts4.2/src/room/defaults.d.ts +1 -1
  77. package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +4 -4
  78. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -1
  79. package/dist/ts4.2/src/room/participant/publishUtils.d.ts +2 -1
  80. package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +1 -1
  81. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +1 -1
  82. package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
  83. package/dist/ts4.2/src/room/track/create.d.ts +1 -1
  84. package/dist/ts4.2/src/room/track/options.d.ts +10 -2
  85. package/dist/ts4.2/src/room/utils.d.ts +1 -0
  86. package/package.json +12 -12
  87. package/src/api/SignalClient.ts +10 -11
  88. package/src/connectionHelper/ConnectionCheck.ts +2 -1
  89. package/src/index.ts +13 -8
  90. package/src/room/PCTransport.ts +9 -5
  91. package/src/room/RTCEngine.ts +10 -3
  92. package/src/room/defaults.ts +6 -4
  93. package/src/room/participant/LocalParticipant.ts +10 -9
  94. package/src/room/participant/RemoteParticipant.ts +2 -1
  95. package/src/room/participant/publishUtils.ts +7 -5
  96. package/src/room/track/LocalAudioTrack.ts +2 -1
  97. package/src/room/track/LocalVideoTrack.ts +3 -2
  98. package/src/room/track/RemoteAudioTrack.ts +2 -1
  99. package/src/room/track/RemoteVideoTrack.ts +4 -8
  100. package/src/room/track/create.ts +2 -2
  101. package/src/room/track/options.ts +23 -7
  102. package/src/room/utils.ts +15 -2
@@ -1,125 +1,125 @@
1
- import type TypedEventEmitter from 'typed-emitter';
2
- import type { SignalClient } from '../../api/SignalClient';
3
- import { TrackSource, TrackType } from '../../proto/livekit_models';
4
- import { StreamState as ProtoStreamState } from '../../proto/livekit_rtc';
5
- declare const Track_base: new () => TypedEventEmitter<TrackEventCallbacks>;
6
- export declare abstract class Track extends Track_base {
7
- kind: Track.Kind;
8
- attachedElements: HTMLMediaElement[];
9
- isMuted: boolean;
10
- source: Track.Source;
11
- /**
12
- * sid is set after track is published to server, or if it's a remote track
13
- */
14
- sid?: Track.SID;
15
- /**
16
- * @internal
17
- */
18
- mediaStream?: MediaStream;
19
- /**
20
- * indicates current state of stream, it'll indicate `paused` if the track
21
- * has been paused by congestion controller
22
- */
23
- streamState: Track.StreamState;
24
- protected _mediaStreamTrack: MediaStreamTrack;
25
- protected _mediaStreamID: string;
26
- protected isInBackground: boolean;
27
- private backgroundTimeout;
28
- protected _currentBitrate: number;
29
- protected monitorInterval?: ReturnType<typeof setInterval>;
30
- protected constructor(mediaTrack: MediaStreamTrack, kind: Track.Kind);
31
- /** current receive bits per second */
32
- get currentBitrate(): number;
33
- get mediaStreamTrack(): MediaStreamTrack;
34
- /**
35
- * @internal
36
- * used for keep mediaStream's first id, since it's id might change
37
- * if we disable/enable a track
38
- */
39
- get mediaStreamID(): string;
40
- /**
41
- * creates a new HTMLAudioElement or HTMLVideoElement, attaches to it, and returns it
42
- */
43
- attach(): HTMLMediaElement;
44
- /**
45
- * attaches track to an existing HTMLAudioElement or HTMLVideoElement
46
- */
47
- attach(element: HTMLMediaElement): HTMLMediaElement;
48
- /**
49
- * Detaches from all attached elements
50
- */
51
- detach(): HTMLMediaElement[];
52
- /**
53
- * Detach from a single element
54
- * @param element
55
- */
56
- detach(element: HTMLMediaElement): HTMLMediaElement;
57
- stop(): void;
58
- protected enable(): void;
59
- protected disable(): void;
60
- abstract startMonitor(signalClient?: SignalClient): void;
61
- stopMonitor(): void;
62
- private recycleElement;
63
- protected appVisibilityChangedListener: () => void;
64
- protected handleAppVisibilityChanged(): Promise<void>;
65
- protected addAppVisibilityListener(): void;
66
- protected removeAppVisibilityListener(): void;
67
- }
68
- /** @internal */
69
- export declare function attachToElement(track: MediaStreamTrack, element: HTMLMediaElement): void;
70
- /** @internal */
71
- export declare function detachTrack(track: MediaStreamTrack, element: HTMLMediaElement): void;
72
- export declare namespace Track {
73
- enum Kind {
74
- Audio = "audio",
75
- Video = "video",
76
- Unknown = "unknown"
77
- }
78
- type SID = string;
79
- enum Source {
80
- Camera = "camera",
81
- Microphone = "microphone",
82
- ScreenShare = "screen_share",
83
- ScreenShareAudio = "screen_share_audio",
84
- Unknown = "unknown"
85
- }
86
- enum StreamState {
87
- Active = "active",
88
- Paused = "paused",
89
- Unknown = "unknown"
90
- }
91
- interface Dimensions {
92
- width: number;
93
- height: number;
94
- }
95
- /** @internal */
96
- function kindToProto(k: Kind): TrackType;
97
- /** @internal */
98
- function kindFromProto(t: TrackType): Kind | undefined;
99
- /** @internal */
100
- function sourceToProto(s: Source): TrackSource;
101
- /** @internal */
102
- function sourceFromProto(s: TrackSource): Source;
103
- /** @internal */
104
- function streamStateFromProto(s: ProtoStreamState): StreamState;
105
- }
106
- export type TrackEventCallbacks = {
107
- message: () => void;
108
- muted: (track?: any) => void;
109
- unmuted: (track?: any) => void;
110
- restarted: (track?: any) => void;
111
- ended: (track?: any) => void;
112
- updateSettings: () => void;
113
- updateSubscription: () => void;
114
- audioPlaybackStarted: () => void;
115
- audioPlaybackFailed: (error: Error) => void;
116
- audioSilenceDetected: () => void;
117
- visibilityChanged: (visible: boolean, track?: any) => void;
118
- videoDimensionsChanged: (dimensions: Track.Dimensions, track?: any) => void;
119
- elementAttached: (element: HTMLMediaElement) => void;
120
- elementDetached: (element: HTMLMediaElement) => void;
121
- upstreamPaused: (track: any) => void;
122
- upstreamResumed: (track: any) => void;
123
- };
124
- export {};
1
+ import type TypedEventEmitter from 'typed-emitter';
2
+ import type { SignalClient } from '../../api/SignalClient';
3
+ import { TrackSource, TrackType } from '../../proto/livekit_models';
4
+ import { StreamState as ProtoStreamState } from '../../proto/livekit_rtc';
5
+ declare const Track_base: new () => TypedEventEmitter<TrackEventCallbacks>;
6
+ export declare abstract class Track extends Track_base {
7
+ kind: Track.Kind;
8
+ attachedElements: HTMLMediaElement[];
9
+ isMuted: boolean;
10
+ source: Track.Source;
11
+ /**
12
+ * sid is set after track is published to server, or if it's a remote track
13
+ */
14
+ sid?: Track.SID;
15
+ /**
16
+ * @internal
17
+ */
18
+ mediaStream?: MediaStream;
19
+ /**
20
+ * indicates current state of stream, it'll indicate `paused` if the track
21
+ * has been paused by congestion controller
22
+ */
23
+ streamState: Track.StreamState;
24
+ protected _mediaStreamTrack: MediaStreamTrack;
25
+ protected _mediaStreamID: string;
26
+ protected isInBackground: boolean;
27
+ private backgroundTimeout;
28
+ protected _currentBitrate: number;
29
+ protected monitorInterval?: ReturnType<typeof setInterval>;
30
+ protected constructor(mediaTrack: MediaStreamTrack, kind: Track.Kind);
31
+ /** current receive bits per second */
32
+ get currentBitrate(): number;
33
+ get mediaStreamTrack(): MediaStreamTrack;
34
+ /**
35
+ * @internal
36
+ * used for keep mediaStream's first id, since it's id might change
37
+ * if we disable/enable a track
38
+ */
39
+ get mediaStreamID(): string;
40
+ /**
41
+ * creates a new HTMLAudioElement or HTMLVideoElement, attaches to it, and returns it
42
+ */
43
+ attach(): HTMLMediaElement;
44
+ /**
45
+ * attaches track to an existing HTMLAudioElement or HTMLVideoElement
46
+ */
47
+ attach(element: HTMLMediaElement): HTMLMediaElement;
48
+ /**
49
+ * Detaches from all attached elements
50
+ */
51
+ detach(): HTMLMediaElement[];
52
+ /**
53
+ * Detach from a single element
54
+ * @param element
55
+ */
56
+ detach(element: HTMLMediaElement): HTMLMediaElement;
57
+ stop(): void;
58
+ protected enable(): void;
59
+ protected disable(): void;
60
+ abstract startMonitor(signalClient?: SignalClient): void;
61
+ stopMonitor(): void;
62
+ private recycleElement;
63
+ protected appVisibilityChangedListener: () => void;
64
+ protected handleAppVisibilityChanged(): Promise<void>;
65
+ protected addAppVisibilityListener(): void;
66
+ protected removeAppVisibilityListener(): void;
67
+ }
68
+ /** @internal */
69
+ export declare function attachToElement(track: MediaStreamTrack, element: HTMLMediaElement): void;
70
+ /** @internal */
71
+ export declare function detachTrack(track: MediaStreamTrack, element: HTMLMediaElement): void;
72
+ export declare namespace Track {
73
+ enum Kind {
74
+ Audio = "audio",
75
+ Video = "video",
76
+ Unknown = "unknown"
77
+ }
78
+ type SID = string;
79
+ enum Source {
80
+ Camera = "camera",
81
+ Microphone = "microphone",
82
+ ScreenShare = "screen_share",
83
+ ScreenShareAudio = "screen_share_audio",
84
+ Unknown = "unknown"
85
+ }
86
+ enum StreamState {
87
+ Active = "active",
88
+ Paused = "paused",
89
+ Unknown = "unknown"
90
+ }
91
+ interface Dimensions {
92
+ width: number;
93
+ height: number;
94
+ }
95
+ /** @internal */
96
+ function kindToProto(k: Kind): TrackType;
97
+ /** @internal */
98
+ function kindFromProto(t: TrackType): Kind | undefined;
99
+ /** @internal */
100
+ function sourceToProto(s: Source): TrackSource;
101
+ /** @internal */
102
+ function sourceFromProto(s: TrackSource): Source;
103
+ /** @internal */
104
+ function streamStateFromProto(s: ProtoStreamState): StreamState;
105
+ }
106
+ export type TrackEventCallbacks = {
107
+ message: () => void;
108
+ muted: (track?: any) => void;
109
+ unmuted: (track?: any) => void;
110
+ restarted: (track?: any) => void;
111
+ ended: (track?: any) => void;
112
+ updateSettings: () => void;
113
+ updateSubscription: () => void;
114
+ audioPlaybackStarted: () => void;
115
+ audioPlaybackFailed: (error: Error) => void;
116
+ audioSilenceDetected: () => void;
117
+ visibilityChanged: (visible: boolean, track?: any) => void;
118
+ videoDimensionsChanged: (dimensions: Track.Dimensions, track?: any) => void;
119
+ elementAttached: (element: HTMLMediaElement) => void;
120
+ elementDetached: (element: HTMLMediaElement) => void;
121
+ upstreamPaused: (track: any) => void;
122
+ upstreamResumed: (track: any) => void;
123
+ };
124
+ export {};
125
125
  //# sourceMappingURL=Track.d.ts.map
@@ -1,68 +1,68 @@
1
- import type TypedEventEmitter from 'typed-emitter';
2
- import type { TrackInfo } from '../../proto/livekit_models';
3
- import type { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc';
4
- import LocalAudioTrack from './LocalAudioTrack';
5
- import LocalVideoTrack from './LocalVideoTrack';
6
- import RemoteAudioTrack from './RemoteAudioTrack';
7
- import type RemoteTrack from './RemoteTrack';
8
- import RemoteVideoTrack from './RemoteVideoTrack';
9
- import { Track } from './Track';
10
- declare const TrackPublication_base: new () => TypedEventEmitter<PublicationEventCallbacks>;
11
- export declare class TrackPublication extends TrackPublication_base {
12
- kind: Track.Kind;
13
- trackName: string;
14
- trackSid: Track.SID;
15
- track?: Track;
16
- source: Track.Source;
17
- /** MimeType of the published track */
18
- mimeType?: string;
19
- /** dimension of the original published stream, video-only */
20
- dimensions?: Track.Dimensions;
21
- /** true if track was simulcasted to server, video-only */
22
- simulcasted?: boolean;
23
- /** @internal */
24
- trackInfo?: TrackInfo;
25
- protected metadataMuted: boolean;
26
- constructor(kind: Track.Kind, id: string, name: string);
27
- /** @internal */
28
- setTrack(track?: Track): void;
29
- get isMuted(): boolean;
30
- get isEnabled(): boolean;
31
- get isSubscribed(): boolean;
32
- /**
33
- * an [AudioTrack] if this publication holds an audio track
34
- */
35
- get audioTrack(): LocalAudioTrack | RemoteAudioTrack | undefined;
36
- /**
37
- * an [VideoTrack] if this publication holds a video track
38
- */
39
- get videoTrack(): LocalVideoTrack | RemoteVideoTrack | undefined;
40
- handleMuted: () => void;
41
- handleUnmuted: () => void;
42
- /** @internal */
43
- updateInfo(info: TrackInfo): void;
44
- }
45
- export declare namespace TrackPublication {
46
- enum SubscriptionStatus {
47
- Desired = "desired",
48
- Subscribed = "subscribed",
49
- Unsubscribed = "unsubscribed"
50
- }
51
- enum PermissionStatus {
52
- Allowed = "allowed",
53
- NotAllowed = "not_allowed"
54
- }
55
- }
56
- export type PublicationEventCallbacks = {
57
- muted: () => void;
58
- unmuted: () => void;
59
- ended: (track?: Track) => void;
60
- updateSettings: (settings: UpdateTrackSettings) => void;
61
- subscriptionPermissionChanged: (status: TrackPublication.PermissionStatus, prevStatus: TrackPublication.PermissionStatus) => void;
62
- updateSubscription: (sub: UpdateSubscription) => void;
63
- subscribed: (track: RemoteTrack) => void;
64
- unsubscribed: (track: RemoteTrack) => void;
65
- subscriptionStatusChanged: (status: TrackPublication.SubscriptionStatus, prevStatus: TrackPublication.SubscriptionStatus) => void;
66
- };
67
- export {};
1
+ import type TypedEventEmitter from 'typed-emitter';
2
+ import type { TrackInfo } from '../../proto/livekit_models';
3
+ import type { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc';
4
+ import LocalAudioTrack from './LocalAudioTrack';
5
+ import LocalVideoTrack from './LocalVideoTrack';
6
+ import RemoteAudioTrack from './RemoteAudioTrack';
7
+ import type RemoteTrack from './RemoteTrack';
8
+ import RemoteVideoTrack from './RemoteVideoTrack';
9
+ import { Track } from './Track';
10
+ declare const TrackPublication_base: new () => TypedEventEmitter<PublicationEventCallbacks>;
11
+ export declare class TrackPublication extends TrackPublication_base {
12
+ kind: Track.Kind;
13
+ trackName: string;
14
+ trackSid: Track.SID;
15
+ track?: Track;
16
+ source: Track.Source;
17
+ /** MimeType of the published track */
18
+ mimeType?: string;
19
+ /** dimension of the original published stream, video-only */
20
+ dimensions?: Track.Dimensions;
21
+ /** true if track was simulcasted to server, video-only */
22
+ simulcasted?: boolean;
23
+ /** @internal */
24
+ trackInfo?: TrackInfo;
25
+ protected metadataMuted: boolean;
26
+ constructor(kind: Track.Kind, id: string, name: string);
27
+ /** @internal */
28
+ setTrack(track?: Track): void;
29
+ get isMuted(): boolean;
30
+ get isEnabled(): boolean;
31
+ get isSubscribed(): boolean;
32
+ /**
33
+ * an [AudioTrack] if this publication holds an audio track
34
+ */
35
+ get audioTrack(): LocalAudioTrack | RemoteAudioTrack | undefined;
36
+ /**
37
+ * an [VideoTrack] if this publication holds a video track
38
+ */
39
+ get videoTrack(): LocalVideoTrack | RemoteVideoTrack | undefined;
40
+ handleMuted: () => void;
41
+ handleUnmuted: () => void;
42
+ /** @internal */
43
+ updateInfo(info: TrackInfo): void;
44
+ }
45
+ export declare namespace TrackPublication {
46
+ enum SubscriptionStatus {
47
+ Desired = "desired",
48
+ Subscribed = "subscribed",
49
+ Unsubscribed = "unsubscribed"
50
+ }
51
+ enum PermissionStatus {
52
+ Allowed = "allowed",
53
+ NotAllowed = "not_allowed"
54
+ }
55
+ }
56
+ export type PublicationEventCallbacks = {
57
+ muted: () => void;
58
+ unmuted: () => void;
59
+ ended: (track?: Track) => void;
60
+ updateSettings: (settings: UpdateTrackSettings) => void;
61
+ subscriptionPermissionChanged: (status: TrackPublication.PermissionStatus, prevStatus: TrackPublication.PermissionStatus) => void;
62
+ updateSubscription: (sub: UpdateSubscription) => void;
63
+ subscribed: (track: RemoteTrack) => void;
64
+ unsubscribed: (track: RemoteTrack) => void;
65
+ subscriptionStatusChanged: (status: TrackPublication.SubscriptionStatus, prevStatus: TrackPublication.SubscriptionStatus) => void;
66
+ };
67
+ export {};
68
68
  //# sourceMappingURL=TrackPublication.d.ts.map
@@ -1,24 +1,24 @@
1
- import LocalAudioTrack from './LocalAudioTrack';
2
- import type LocalTrack from './LocalTrack';
3
- import LocalVideoTrack from './LocalVideoTrack';
4
- import { AudioCaptureOptions, CreateLocalTracksOptions, ScreenShareCaptureOptions, VideoCaptureOptions } from './options';
5
- /**
6
- * Creates a local video and audio track at the same time. When acquiring both
7
- * audio and video tracks together, it'll display a single permission prompt to
8
- * the user instead of two separate ones.
9
- * @param options
10
- */
11
- export declare function createLocalTracks(options?: CreateLocalTracksOptions): Promise<Array<LocalTrack>>;
12
- /**
13
- * Creates a [[LocalVideoTrack]] with getUserMedia()
14
- * @param options
15
- */
16
- export declare function createLocalVideoTrack(options?: VideoCaptureOptions): Promise<LocalVideoTrack>;
17
- export declare function createLocalAudioTrack(options?: AudioCaptureOptions): Promise<LocalAudioTrack>;
18
- /**
19
- * Creates a screen capture tracks with getDisplayMedia().
20
- * A LocalVideoTrack is always created and returned.
21
- * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
22
- */
23
- export declare function createLocalScreenTracks(options?: ScreenShareCaptureOptions): Promise<Array<LocalTrack>>;
1
+ import LocalAudioTrack from './LocalAudioTrack';
2
+ import type LocalTrack from './LocalTrack';
3
+ import LocalVideoTrack from './LocalVideoTrack';
4
+ import type { AudioCaptureOptions, CreateLocalTracksOptions, ScreenShareCaptureOptions, VideoCaptureOptions } from './options';
5
+ /**
6
+ * Creates a local video and audio track at the same time. When acquiring both
7
+ * audio and video tracks together, it'll display a single permission prompt to
8
+ * the user instead of two separate ones.
9
+ * @param options
10
+ */
11
+ export declare function createLocalTracks(options?: CreateLocalTracksOptions): Promise<Array<LocalTrack>>;
12
+ /**
13
+ * Creates a [[LocalVideoTrack]] with getUserMedia()
14
+ * @param options
15
+ */
16
+ export declare function createLocalVideoTrack(options?: VideoCaptureOptions): Promise<LocalVideoTrack>;
17
+ export declare function createLocalAudioTrack(options?: AudioCaptureOptions): Promise<LocalAudioTrack>;
18
+ /**
19
+ * Creates a screen capture tracks with getDisplayMedia().
20
+ * A LocalVideoTrack is always created and returned.
21
+ * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
22
+ */
23
+ export declare function createLocalScreenTracks(options?: ScreenShareCaptureOptions): Promise<Array<LocalTrack>>;
24
24
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/room/track/create.ts"],"names":[],"mappings":"AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EAEpB,MAAM,WAAW,CAAC;AAGnB;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CA2C5B;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAwC5B"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/room/track/create.ts"],"names":[],"mappings":"AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAGnB;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CA2C5B;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAwC5B"}