livekit-client 0.16.5 → 0.17.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/api/RequestQueue.js +6 -6
- package/dist/api/RequestQueue.js.map +1 -1
- package/dist/api/SignalClient.d.ts +3 -0
- package/dist/api/SignalClient.js +24 -3
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/connect.js +1 -1
- package/dist/connect.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/options.d.ts +7 -2
- package/dist/proto/livekit_models.d.ts +33 -0
- package/dist/proto/livekit_models.js +213 -3
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +15 -1
- package/dist/proto/livekit_rtc.js +128 -2
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +21 -6
- package/dist/room/RTCEngine.js +13 -8
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +43 -6
- package/dist/room/Room.js +81 -59
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +14 -2
- package/dist/room/events.js +16 -4
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +3 -1
- package/dist/room/participant/LocalParticipant.js +17 -1
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +30 -4
- package/dist/room/participant/Participant.js +2 -2
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/participant/RemoteParticipant.d.ts +5 -5
- package/dist/room/participant/RemoteParticipant.js +3 -3
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.d.ts +6 -0
- package/dist/room/participant/publishUtils.js +65 -24
- package/dist/room/participant/publishUtils.js.map +1 -1
- package/dist/room/participant/publishUtils.test.js +35 -5
- package/dist/room/participant/publishUtils.test.js.map +1 -1
- package/dist/room/track/LocalAudioTrack.d.ts +2 -0
- package/dist/room/track/LocalAudioTrack.js +23 -0
- package/dist/room/track/LocalAudioTrack.js.map +1 -1
- package/dist/room/track/LocalTrack.d.ts +4 -0
- package/dist/room/track/LocalTrack.js +34 -0
- package/dist/room/track/LocalTrack.js.map +1 -1
- package/dist/room/track/LocalVideoTrack.d.ts +1 -0
- package/dist/room/track/LocalVideoTrack.js +13 -0
- package/dist/room/track/LocalVideoTrack.js.map +1 -1
- package/dist/room/track/RemoteTrack.d.ts +1 -0
- package/dist/room/track/RemoteTrack.js +1 -0
- package/dist/room/track/RemoteTrack.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.d.ts +4 -2
- package/dist/room/track/RemoteVideoTrack.js +23 -8
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.d.ts +20 -4
- package/dist/room/track/Track.js +20 -1
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/defaults.js +2 -2
- package/dist/room/track/defaults.js.map +1 -1
- package/dist/room/track/options.d.ts +65 -15
- package/dist/room/track/options.js +38 -0
- package/dist/room/track/options.js.map +1 -1
- package/dist/room/track/types.d.ts +15 -4
- package/dist/room/track/utils.d.ts +10 -0
- package/dist/room/track/utils.js +46 -1
- package/dist/room/track/utils.js.map +1 -1
- package/dist/room/utils.d.ts +1 -0
- package/dist/room/utils.js +5 -1
- package/dist/room/utils.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/src/api/RequestQueue.ts +7 -7
- package/src/api/SignalClient.ts +31 -4
- package/src/connect.ts +1 -1
- package/src/index.ts +1 -1
- package/src/options.ts +12 -3
- package/src/proto/livekit_models.ts +249 -0
- package/src/proto/livekit_rtc.ts +155 -0
- package/src/room/RTCEngine.ts +43 -11
- package/src/room/Room.ts +152 -66
- package/src/room/events.ts +16 -2
- package/src/room/participant/LocalParticipant.ts +23 -4
- package/src/room/participant/Participant.ts +39 -4
- package/src/room/participant/RemoteParticipant.ts +10 -8
- package/src/room/participant/publishUtils.test.ts +46 -6
- package/src/room/participant/publishUtils.ts +72 -27
- package/src/room/track/LocalAudioTrack.ts +19 -1
- package/src/room/track/LocalTrack.ts +36 -0
- package/src/room/track/LocalVideoTrack.ts +9 -1
- package/src/room/track/RemoteTrack.ts +2 -0
- package/src/room/track/RemoteVideoTrack.ts +22 -9
- package/src/room/track/Track.ts +29 -3
- package/src/room/track/defaults.ts +2 -2
- package/src/room/track/options.ts +55 -3
- package/src/room/track/types.ts +16 -4
- package/src/room/track/utils.ts +39 -0
- package/src/room/utils.ts +4 -0
- package/src/version.ts +1 -1
@@ -174,6 +174,44 @@ export function connectionQualityToJSON(object: ConnectionQuality): string {
|
|
174
174
|
}
|
175
175
|
}
|
176
176
|
|
177
|
+
export enum ClientConfigSetting {
|
178
|
+
UNSET = 0,
|
179
|
+
DISABLED = 1,
|
180
|
+
ENABLED = 2,
|
181
|
+
UNRECOGNIZED = -1,
|
182
|
+
}
|
183
|
+
|
184
|
+
export function clientConfigSettingFromJSON(object: any): ClientConfigSetting {
|
185
|
+
switch (object) {
|
186
|
+
case 0:
|
187
|
+
case "UNSET":
|
188
|
+
return ClientConfigSetting.UNSET;
|
189
|
+
case 1:
|
190
|
+
case "DISABLED":
|
191
|
+
return ClientConfigSetting.DISABLED;
|
192
|
+
case 2:
|
193
|
+
case "ENABLED":
|
194
|
+
return ClientConfigSetting.ENABLED;
|
195
|
+
case -1:
|
196
|
+
case "UNRECOGNIZED":
|
197
|
+
default:
|
198
|
+
return ClientConfigSetting.UNRECOGNIZED;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
|
202
|
+
export function clientConfigSettingToJSON(object: ClientConfigSetting): string {
|
203
|
+
switch (object) {
|
204
|
+
case ClientConfigSetting.UNSET:
|
205
|
+
return "UNSET";
|
206
|
+
case ClientConfigSetting.DISABLED:
|
207
|
+
return "DISABLED";
|
208
|
+
case ClientConfigSetting.ENABLED:
|
209
|
+
return "ENABLED";
|
210
|
+
default:
|
211
|
+
return "UNKNOWN";
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
177
215
|
export interface Room {
|
178
216
|
sid: string;
|
179
217
|
name: string;
|
@@ -203,6 +241,7 @@ export interface ParticipantInfo {
|
|
203
241
|
hidden: boolean;
|
204
242
|
recorder: boolean;
|
205
243
|
name: string;
|
244
|
+
version: number;
|
206
245
|
}
|
207
246
|
|
208
247
|
export enum ParticipantInfo_State {
|
@@ -368,6 +407,7 @@ export interface ClientInfo {
|
|
368
407
|
deviceModel: string;
|
369
408
|
browser: string;
|
370
409
|
browserVersion: string;
|
410
|
+
address: string;
|
371
411
|
}
|
372
412
|
|
373
413
|
export enum ClientInfo_SDK {
|
@@ -432,6 +472,17 @@ export function clientInfo_SDKToJSON(object: ClientInfo_SDK): string {
|
|
432
472
|
}
|
433
473
|
}
|
434
474
|
|
475
|
+
/** server provided client configuration */
|
476
|
+
export interface ClientConfiguration {
|
477
|
+
video?: VideoConfiguration;
|
478
|
+
screen?: VideoConfiguration;
|
479
|
+
resumeConnection: ClientConfigSetting;
|
480
|
+
}
|
481
|
+
|
482
|
+
export interface VideoConfiguration {
|
483
|
+
hardwareEncoder: ClientConfigSetting;
|
484
|
+
}
|
485
|
+
|
435
486
|
const baseRoom: object = {
|
436
487
|
sid: "",
|
437
488
|
name: "",
|
@@ -711,6 +762,7 @@ const baseParticipantInfo: object = {
|
|
711
762
|
hidden: false,
|
712
763
|
recorder: false,
|
713
764
|
name: "",
|
765
|
+
version: 0,
|
714
766
|
};
|
715
767
|
|
716
768
|
export const ParticipantInfo = {
|
@@ -745,6 +797,9 @@ export const ParticipantInfo = {
|
|
745
797
|
if (message.name !== "") {
|
746
798
|
writer.uint32(74).string(message.name);
|
747
799
|
}
|
800
|
+
if (message.version !== 0) {
|
801
|
+
writer.uint32(80).uint32(message.version);
|
802
|
+
}
|
748
803
|
return writer;
|
749
804
|
},
|
750
805
|
|
@@ -783,6 +838,9 @@ export const ParticipantInfo = {
|
|
783
838
|
case 9:
|
784
839
|
message.name = reader.string();
|
785
840
|
break;
|
841
|
+
case 10:
|
842
|
+
message.version = reader.uint32();
|
843
|
+
break;
|
786
844
|
default:
|
787
845
|
reader.skipType(tag & 7);
|
788
846
|
break;
|
@@ -839,6 +897,11 @@ export const ParticipantInfo = {
|
|
839
897
|
} else {
|
840
898
|
message.name = "";
|
841
899
|
}
|
900
|
+
if (object.version !== undefined && object.version !== null) {
|
901
|
+
message.version = Number(object.version);
|
902
|
+
} else {
|
903
|
+
message.version = 0;
|
904
|
+
}
|
842
905
|
return message;
|
843
906
|
},
|
844
907
|
|
@@ -860,6 +923,7 @@ export const ParticipantInfo = {
|
|
860
923
|
message.hidden !== undefined && (obj.hidden = message.hidden);
|
861
924
|
message.recorder !== undefined && (obj.recorder = message.recorder);
|
862
925
|
message.name !== undefined && (obj.name = message.name);
|
926
|
+
message.version !== undefined && (obj.version = message.version);
|
863
927
|
return obj;
|
864
928
|
},
|
865
929
|
|
@@ -879,6 +943,7 @@ export const ParticipantInfo = {
|
|
879
943
|
message.hidden = object.hidden ?? false;
|
880
944
|
message.recorder = object.recorder ?? false;
|
881
945
|
message.name = object.name ?? "";
|
946
|
+
message.version = object.version ?? 0;
|
882
947
|
return message;
|
883
948
|
},
|
884
949
|
};
|
@@ -1651,6 +1716,7 @@ const baseClientInfo: object = {
|
|
1651
1716
|
deviceModel: "",
|
1652
1717
|
browser: "",
|
1653
1718
|
browserVersion: "",
|
1719
|
+
address: "",
|
1654
1720
|
};
|
1655
1721
|
|
1656
1722
|
export const ClientInfo = {
|
@@ -1682,6 +1748,9 @@ export const ClientInfo = {
|
|
1682
1748
|
if (message.browserVersion !== "") {
|
1683
1749
|
writer.uint32(66).string(message.browserVersion);
|
1684
1750
|
}
|
1751
|
+
if (message.address !== "") {
|
1752
|
+
writer.uint32(74).string(message.address);
|
1753
|
+
}
|
1685
1754
|
return writer;
|
1686
1755
|
},
|
1687
1756
|
|
@@ -1716,6 +1785,9 @@ export const ClientInfo = {
|
|
1716
1785
|
case 8:
|
1717
1786
|
message.browserVersion = reader.string();
|
1718
1787
|
break;
|
1788
|
+
case 9:
|
1789
|
+
message.address = reader.string();
|
1790
|
+
break;
|
1719
1791
|
default:
|
1720
1792
|
reader.skipType(tag & 7);
|
1721
1793
|
break;
|
@@ -1766,6 +1838,11 @@ export const ClientInfo = {
|
|
1766
1838
|
} else {
|
1767
1839
|
message.browserVersion = "";
|
1768
1840
|
}
|
1841
|
+
if (object.address !== undefined && object.address !== null) {
|
1842
|
+
message.address = String(object.address);
|
1843
|
+
} else {
|
1844
|
+
message.address = "";
|
1845
|
+
}
|
1769
1846
|
return message;
|
1770
1847
|
},
|
1771
1848
|
|
@@ -1781,6 +1858,7 @@ export const ClientInfo = {
|
|
1781
1858
|
message.browser !== undefined && (obj.browser = message.browser);
|
1782
1859
|
message.browserVersion !== undefined &&
|
1783
1860
|
(obj.browserVersion = message.browserVersion);
|
1861
|
+
message.address !== undefined && (obj.address = message.address);
|
1784
1862
|
return obj;
|
1785
1863
|
},
|
1786
1864
|
|
@@ -1794,6 +1872,177 @@ export const ClientInfo = {
|
|
1794
1872
|
message.deviceModel = object.deviceModel ?? "";
|
1795
1873
|
message.browser = object.browser ?? "";
|
1796
1874
|
message.browserVersion = object.browserVersion ?? "";
|
1875
|
+
message.address = object.address ?? "";
|
1876
|
+
return message;
|
1877
|
+
},
|
1878
|
+
};
|
1879
|
+
|
1880
|
+
const baseClientConfiguration: object = { resumeConnection: 0 };
|
1881
|
+
|
1882
|
+
export const ClientConfiguration = {
|
1883
|
+
encode(
|
1884
|
+
message: ClientConfiguration,
|
1885
|
+
writer: _m0.Writer = _m0.Writer.create()
|
1886
|
+
): _m0.Writer {
|
1887
|
+
if (message.video !== undefined) {
|
1888
|
+
VideoConfiguration.encode(
|
1889
|
+
message.video,
|
1890
|
+
writer.uint32(10).fork()
|
1891
|
+
).ldelim();
|
1892
|
+
}
|
1893
|
+
if (message.screen !== undefined) {
|
1894
|
+
VideoConfiguration.encode(
|
1895
|
+
message.screen,
|
1896
|
+
writer.uint32(18).fork()
|
1897
|
+
).ldelim();
|
1898
|
+
}
|
1899
|
+
if (message.resumeConnection !== 0) {
|
1900
|
+
writer.uint32(24).int32(message.resumeConnection);
|
1901
|
+
}
|
1902
|
+
return writer;
|
1903
|
+
},
|
1904
|
+
|
1905
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ClientConfiguration {
|
1906
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1907
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1908
|
+
const message = { ...baseClientConfiguration } as ClientConfiguration;
|
1909
|
+
while (reader.pos < end) {
|
1910
|
+
const tag = reader.uint32();
|
1911
|
+
switch (tag >>> 3) {
|
1912
|
+
case 1:
|
1913
|
+
message.video = VideoConfiguration.decode(reader, reader.uint32());
|
1914
|
+
break;
|
1915
|
+
case 2:
|
1916
|
+
message.screen = VideoConfiguration.decode(reader, reader.uint32());
|
1917
|
+
break;
|
1918
|
+
case 3:
|
1919
|
+
message.resumeConnection = reader.int32() as any;
|
1920
|
+
break;
|
1921
|
+
default:
|
1922
|
+
reader.skipType(tag & 7);
|
1923
|
+
break;
|
1924
|
+
}
|
1925
|
+
}
|
1926
|
+
return message;
|
1927
|
+
},
|
1928
|
+
|
1929
|
+
fromJSON(object: any): ClientConfiguration {
|
1930
|
+
const message = { ...baseClientConfiguration } as ClientConfiguration;
|
1931
|
+
if (object.video !== undefined && object.video !== null) {
|
1932
|
+
message.video = VideoConfiguration.fromJSON(object.video);
|
1933
|
+
} else {
|
1934
|
+
message.video = undefined;
|
1935
|
+
}
|
1936
|
+
if (object.screen !== undefined && object.screen !== null) {
|
1937
|
+
message.screen = VideoConfiguration.fromJSON(object.screen);
|
1938
|
+
} else {
|
1939
|
+
message.screen = undefined;
|
1940
|
+
}
|
1941
|
+
if (
|
1942
|
+
object.resumeConnection !== undefined &&
|
1943
|
+
object.resumeConnection !== null
|
1944
|
+
) {
|
1945
|
+
message.resumeConnection = clientConfigSettingFromJSON(
|
1946
|
+
object.resumeConnection
|
1947
|
+
);
|
1948
|
+
} else {
|
1949
|
+
message.resumeConnection = 0;
|
1950
|
+
}
|
1951
|
+
return message;
|
1952
|
+
},
|
1953
|
+
|
1954
|
+
toJSON(message: ClientConfiguration): unknown {
|
1955
|
+
const obj: any = {};
|
1956
|
+
message.video !== undefined &&
|
1957
|
+
(obj.video = message.video
|
1958
|
+
? VideoConfiguration.toJSON(message.video)
|
1959
|
+
: undefined);
|
1960
|
+
message.screen !== undefined &&
|
1961
|
+
(obj.screen = message.screen
|
1962
|
+
? VideoConfiguration.toJSON(message.screen)
|
1963
|
+
: undefined);
|
1964
|
+
message.resumeConnection !== undefined &&
|
1965
|
+
(obj.resumeConnection = clientConfigSettingToJSON(
|
1966
|
+
message.resumeConnection
|
1967
|
+
));
|
1968
|
+
return obj;
|
1969
|
+
},
|
1970
|
+
|
1971
|
+
fromPartial(object: DeepPartial<ClientConfiguration>): ClientConfiguration {
|
1972
|
+
const message = { ...baseClientConfiguration } as ClientConfiguration;
|
1973
|
+
if (object.video !== undefined && object.video !== null) {
|
1974
|
+
message.video = VideoConfiguration.fromPartial(object.video);
|
1975
|
+
} else {
|
1976
|
+
message.video = undefined;
|
1977
|
+
}
|
1978
|
+
if (object.screen !== undefined && object.screen !== null) {
|
1979
|
+
message.screen = VideoConfiguration.fromPartial(object.screen);
|
1980
|
+
} else {
|
1981
|
+
message.screen = undefined;
|
1982
|
+
}
|
1983
|
+
message.resumeConnection = object.resumeConnection ?? 0;
|
1984
|
+
return message;
|
1985
|
+
},
|
1986
|
+
};
|
1987
|
+
|
1988
|
+
const baseVideoConfiguration: object = { hardwareEncoder: 0 };
|
1989
|
+
|
1990
|
+
export const VideoConfiguration = {
|
1991
|
+
encode(
|
1992
|
+
message: VideoConfiguration,
|
1993
|
+
writer: _m0.Writer = _m0.Writer.create()
|
1994
|
+
): _m0.Writer {
|
1995
|
+
if (message.hardwareEncoder !== 0) {
|
1996
|
+
writer.uint32(8).int32(message.hardwareEncoder);
|
1997
|
+
}
|
1998
|
+
return writer;
|
1999
|
+
},
|
2000
|
+
|
2001
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): VideoConfiguration {
|
2002
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2003
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
2004
|
+
const message = { ...baseVideoConfiguration } as VideoConfiguration;
|
2005
|
+
while (reader.pos < end) {
|
2006
|
+
const tag = reader.uint32();
|
2007
|
+
switch (tag >>> 3) {
|
2008
|
+
case 1:
|
2009
|
+
message.hardwareEncoder = reader.int32() as any;
|
2010
|
+
break;
|
2011
|
+
default:
|
2012
|
+
reader.skipType(tag & 7);
|
2013
|
+
break;
|
2014
|
+
}
|
2015
|
+
}
|
2016
|
+
return message;
|
2017
|
+
},
|
2018
|
+
|
2019
|
+
fromJSON(object: any): VideoConfiguration {
|
2020
|
+
const message = { ...baseVideoConfiguration } as VideoConfiguration;
|
2021
|
+
if (
|
2022
|
+
object.hardwareEncoder !== undefined &&
|
2023
|
+
object.hardwareEncoder !== null
|
2024
|
+
) {
|
2025
|
+
message.hardwareEncoder = clientConfigSettingFromJSON(
|
2026
|
+
object.hardwareEncoder
|
2027
|
+
);
|
2028
|
+
} else {
|
2029
|
+
message.hardwareEncoder = 0;
|
2030
|
+
}
|
2031
|
+
return message;
|
2032
|
+
},
|
2033
|
+
|
2034
|
+
toJSON(message: VideoConfiguration): unknown {
|
2035
|
+
const obj: any = {};
|
2036
|
+
message.hardwareEncoder !== undefined &&
|
2037
|
+
(obj.hardwareEncoder = clientConfigSettingToJSON(
|
2038
|
+
message.hardwareEncoder
|
2039
|
+
));
|
2040
|
+
return obj;
|
2041
|
+
},
|
2042
|
+
|
2043
|
+
fromPartial(object: DeepPartial<VideoConfiguration>): VideoConfiguration {
|
2044
|
+
const message = { ...baseVideoConfiguration } as VideoConfiguration;
|
2045
|
+
message.hardwareEncoder = object.hardwareEncoder ?? 0;
|
1797
2046
|
return message;
|
1798
2047
|
},
|
1799
2048
|
};
|
package/src/proto/livekit_rtc.ts
CHANGED
@@ -6,6 +6,7 @@ import {
|
|
6
6
|
TrackSource,
|
7
7
|
Room,
|
8
8
|
ParticipantInfo,
|
9
|
+
ClientConfiguration,
|
9
10
|
TrackInfo,
|
10
11
|
VideoQuality,
|
11
12
|
ConnectionQuality,
|
@@ -192,6 +193,8 @@ export interface JoinResponse {
|
|
192
193
|
* when this is set, the other fields will be largely empty
|
193
194
|
*/
|
194
195
|
alternativeUrl: string;
|
196
|
+
clientConfiguration?: ClientConfiguration;
|
197
|
+
serverRegion: string;
|
195
198
|
}
|
196
199
|
|
197
200
|
export interface TrackPublishedResponse {
|
@@ -306,6 +309,12 @@ export interface SyncState {
|
|
306
309
|
answer?: SessionDescription;
|
307
310
|
subscription?: UpdateSubscription;
|
308
311
|
publishTracks: TrackPublishedResponse[];
|
312
|
+
dataChannels: DataChannelInfo[];
|
313
|
+
}
|
314
|
+
|
315
|
+
export interface DataChannelInfo {
|
316
|
+
label: string;
|
317
|
+
id: number;
|
309
318
|
}
|
310
319
|
|
311
320
|
export interface SimulateScenario {
|
@@ -1405,6 +1414,7 @@ const baseJoinResponse: object = {
|
|
1405
1414
|
serverVersion: "",
|
1406
1415
|
subscriberPrimary: false,
|
1407
1416
|
alternativeUrl: "",
|
1417
|
+
serverRegion: "",
|
1408
1418
|
};
|
1409
1419
|
|
1410
1420
|
export const JoinResponse = {
|
@@ -1436,6 +1446,15 @@ export const JoinResponse = {
|
|
1436
1446
|
if (message.alternativeUrl !== "") {
|
1437
1447
|
writer.uint32(58).string(message.alternativeUrl);
|
1438
1448
|
}
|
1449
|
+
if (message.clientConfiguration !== undefined) {
|
1450
|
+
ClientConfiguration.encode(
|
1451
|
+
message.clientConfiguration,
|
1452
|
+
writer.uint32(66).fork()
|
1453
|
+
).ldelim();
|
1454
|
+
}
|
1455
|
+
if (message.serverRegion !== "") {
|
1456
|
+
writer.uint32(74).string(message.serverRegion);
|
1457
|
+
}
|
1439
1458
|
return writer;
|
1440
1459
|
},
|
1441
1460
|
|
@@ -1471,6 +1490,15 @@ export const JoinResponse = {
|
|
1471
1490
|
case 7:
|
1472
1491
|
message.alternativeUrl = reader.string();
|
1473
1492
|
break;
|
1493
|
+
case 8:
|
1494
|
+
message.clientConfiguration = ClientConfiguration.decode(
|
1495
|
+
reader,
|
1496
|
+
reader.uint32()
|
1497
|
+
);
|
1498
|
+
break;
|
1499
|
+
case 9:
|
1500
|
+
message.serverRegion = reader.string();
|
1501
|
+
break;
|
1474
1502
|
default:
|
1475
1503
|
reader.skipType(tag & 7);
|
1476
1504
|
break;
|
@@ -1524,6 +1552,21 @@ export const JoinResponse = {
|
|
1524
1552
|
} else {
|
1525
1553
|
message.alternativeUrl = "";
|
1526
1554
|
}
|
1555
|
+
if (
|
1556
|
+
object.clientConfiguration !== undefined &&
|
1557
|
+
object.clientConfiguration !== null
|
1558
|
+
) {
|
1559
|
+
message.clientConfiguration = ClientConfiguration.fromJSON(
|
1560
|
+
object.clientConfiguration
|
1561
|
+
);
|
1562
|
+
} else {
|
1563
|
+
message.clientConfiguration = undefined;
|
1564
|
+
}
|
1565
|
+
if (object.serverRegion !== undefined && object.serverRegion !== null) {
|
1566
|
+
message.serverRegion = String(object.serverRegion);
|
1567
|
+
} else {
|
1568
|
+
message.serverRegion = "";
|
1569
|
+
}
|
1527
1570
|
return message;
|
1528
1571
|
},
|
1529
1572
|
|
@@ -1555,6 +1598,12 @@ export const JoinResponse = {
|
|
1555
1598
|
(obj.subscriberPrimary = message.subscriberPrimary);
|
1556
1599
|
message.alternativeUrl !== undefined &&
|
1557
1600
|
(obj.alternativeUrl = message.alternativeUrl);
|
1601
|
+
message.clientConfiguration !== undefined &&
|
1602
|
+
(obj.clientConfiguration = message.clientConfiguration
|
1603
|
+
? ClientConfiguration.toJSON(message.clientConfiguration)
|
1604
|
+
: undefined);
|
1605
|
+
message.serverRegion !== undefined &&
|
1606
|
+
(obj.serverRegion = message.serverRegion);
|
1558
1607
|
return obj;
|
1559
1608
|
},
|
1560
1609
|
|
@@ -1588,6 +1637,17 @@ export const JoinResponse = {
|
|
1588
1637
|
}
|
1589
1638
|
message.subscriberPrimary = object.subscriberPrimary ?? false;
|
1590
1639
|
message.alternativeUrl = object.alternativeUrl ?? "";
|
1640
|
+
if (
|
1641
|
+
object.clientConfiguration !== undefined &&
|
1642
|
+
object.clientConfiguration !== null
|
1643
|
+
) {
|
1644
|
+
message.clientConfiguration = ClientConfiguration.fromPartial(
|
1645
|
+
object.clientConfiguration
|
1646
|
+
);
|
1647
|
+
} else {
|
1648
|
+
message.clientConfiguration = undefined;
|
1649
|
+
}
|
1650
|
+
message.serverRegion = object.serverRegion ?? "";
|
1591
1651
|
return message;
|
1592
1652
|
},
|
1593
1653
|
};
|
@@ -3197,6 +3257,9 @@ export const SyncState = {
|
|
3197
3257
|
for (const v of message.publishTracks) {
|
3198
3258
|
TrackPublishedResponse.encode(v!, writer.uint32(26).fork()).ldelim();
|
3199
3259
|
}
|
3260
|
+
for (const v of message.dataChannels) {
|
3261
|
+
DataChannelInfo.encode(v!, writer.uint32(34).fork()).ldelim();
|
3262
|
+
}
|
3200
3263
|
return writer;
|
3201
3264
|
},
|
3202
3265
|
|
@@ -3205,6 +3268,7 @@ export const SyncState = {
|
|
3205
3268
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3206
3269
|
const message = { ...baseSyncState } as SyncState;
|
3207
3270
|
message.publishTracks = [];
|
3271
|
+
message.dataChannels = [];
|
3208
3272
|
while (reader.pos < end) {
|
3209
3273
|
const tag = reader.uint32();
|
3210
3274
|
switch (tag >>> 3) {
|
@@ -3222,6 +3286,11 @@ export const SyncState = {
|
|
3222
3286
|
TrackPublishedResponse.decode(reader, reader.uint32())
|
3223
3287
|
);
|
3224
3288
|
break;
|
3289
|
+
case 4:
|
3290
|
+
message.dataChannels.push(
|
3291
|
+
DataChannelInfo.decode(reader, reader.uint32())
|
3292
|
+
);
|
3293
|
+
break;
|
3225
3294
|
default:
|
3226
3295
|
reader.skipType(tag & 7);
|
3227
3296
|
break;
|
@@ -3233,6 +3302,7 @@ export const SyncState = {
|
|
3233
3302
|
fromJSON(object: any): SyncState {
|
3234
3303
|
const message = { ...baseSyncState } as SyncState;
|
3235
3304
|
message.publishTracks = [];
|
3305
|
+
message.dataChannels = [];
|
3236
3306
|
if (object.answer !== undefined && object.answer !== null) {
|
3237
3307
|
message.answer = SessionDescription.fromJSON(object.answer);
|
3238
3308
|
} else {
|
@@ -3248,6 +3318,11 @@ export const SyncState = {
|
|
3248
3318
|
message.publishTracks.push(TrackPublishedResponse.fromJSON(e));
|
3249
3319
|
}
|
3250
3320
|
}
|
3321
|
+
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3322
|
+
for (const e of object.dataChannels) {
|
3323
|
+
message.dataChannels.push(DataChannelInfo.fromJSON(e));
|
3324
|
+
}
|
3325
|
+
}
|
3251
3326
|
return message;
|
3252
3327
|
},
|
3253
3328
|
|
@@ -3268,6 +3343,13 @@ export const SyncState = {
|
|
3268
3343
|
} else {
|
3269
3344
|
obj.publishTracks = [];
|
3270
3345
|
}
|
3346
|
+
if (message.dataChannels) {
|
3347
|
+
obj.dataChannels = message.dataChannels.map((e) =>
|
3348
|
+
e ? DataChannelInfo.toJSON(e) : undefined
|
3349
|
+
);
|
3350
|
+
} else {
|
3351
|
+
obj.dataChannels = [];
|
3352
|
+
}
|
3271
3353
|
return obj;
|
3272
3354
|
},
|
3273
3355
|
|
@@ -3291,6 +3373,79 @@ export const SyncState = {
|
|
3291
3373
|
message.publishTracks.push(TrackPublishedResponse.fromPartial(e));
|
3292
3374
|
}
|
3293
3375
|
}
|
3376
|
+
message.dataChannels = [];
|
3377
|
+
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3378
|
+
for (const e of object.dataChannels) {
|
3379
|
+
message.dataChannels.push(DataChannelInfo.fromPartial(e));
|
3380
|
+
}
|
3381
|
+
}
|
3382
|
+
return message;
|
3383
|
+
},
|
3384
|
+
};
|
3385
|
+
|
3386
|
+
const baseDataChannelInfo: object = { label: "", id: 0 };
|
3387
|
+
|
3388
|
+
export const DataChannelInfo = {
|
3389
|
+
encode(
|
3390
|
+
message: DataChannelInfo,
|
3391
|
+
writer: _m0.Writer = _m0.Writer.create()
|
3392
|
+
): _m0.Writer {
|
3393
|
+
if (message.label !== "") {
|
3394
|
+
writer.uint32(10).string(message.label);
|
3395
|
+
}
|
3396
|
+
if (message.id !== 0) {
|
3397
|
+
writer.uint32(16).uint32(message.id);
|
3398
|
+
}
|
3399
|
+
return writer;
|
3400
|
+
},
|
3401
|
+
|
3402
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DataChannelInfo {
|
3403
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3404
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
3405
|
+
const message = { ...baseDataChannelInfo } as DataChannelInfo;
|
3406
|
+
while (reader.pos < end) {
|
3407
|
+
const tag = reader.uint32();
|
3408
|
+
switch (tag >>> 3) {
|
3409
|
+
case 1:
|
3410
|
+
message.label = reader.string();
|
3411
|
+
break;
|
3412
|
+
case 2:
|
3413
|
+
message.id = reader.uint32();
|
3414
|
+
break;
|
3415
|
+
default:
|
3416
|
+
reader.skipType(tag & 7);
|
3417
|
+
break;
|
3418
|
+
}
|
3419
|
+
}
|
3420
|
+
return message;
|
3421
|
+
},
|
3422
|
+
|
3423
|
+
fromJSON(object: any): DataChannelInfo {
|
3424
|
+
const message = { ...baseDataChannelInfo } as DataChannelInfo;
|
3425
|
+
if (object.label !== undefined && object.label !== null) {
|
3426
|
+
message.label = String(object.label);
|
3427
|
+
} else {
|
3428
|
+
message.label = "";
|
3429
|
+
}
|
3430
|
+
if (object.id !== undefined && object.id !== null) {
|
3431
|
+
message.id = Number(object.id);
|
3432
|
+
} else {
|
3433
|
+
message.id = 0;
|
3434
|
+
}
|
3435
|
+
return message;
|
3436
|
+
},
|
3437
|
+
|
3438
|
+
toJSON(message: DataChannelInfo): unknown {
|
3439
|
+
const obj: any = {};
|
3440
|
+
message.label !== undefined && (obj.label = message.label);
|
3441
|
+
message.id !== undefined && (obj.id = message.id);
|
3442
|
+
return obj;
|
3443
|
+
},
|
3444
|
+
|
3445
|
+
fromPartial(object: DeepPartial<DataChannelInfo>): DataChannelInfo {
|
3446
|
+
const message = { ...baseDataChannelInfo } as DataChannelInfo;
|
3447
|
+
message.label = object.label ?? "";
|
3448
|
+
message.id = object.id ?? 0;
|
3294
3449
|
return message;
|
3295
3450
|
},
|
3296
3451
|
};
|