mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
[twilio-video] Add missing ConnectOptions parameters (#34057)
* Add missing ConnectOptions parameters in twilio-video * Update definitions by on twilio-video
This commit is contained in:
Vendored
+5
-1
@@ -1,6 +1,8 @@
|
||||
// Type definitions for twilio-video 2.0
|
||||
// Project: https://twilio.com/video, https://twilio.com
|
||||
// Definitions by: MindDoc <https://github.com/minddocdev>, Darío Blanco <https://github.com/darioblanco>
|
||||
// Definitions by: MindDoc <https://github.com/minddocdev>
|
||||
// Darío Blanco <https://github.com/darioblanco>
|
||||
// katashin <https://github.com/ktsn>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -469,6 +471,7 @@ export type AudioTrackPublication = LocalAudioTrackPublication | RemoteAudioTrac
|
||||
export interface ConnectOptions {
|
||||
abortOnIceServersTimeout?: boolean;
|
||||
audio?: boolean | CreateLocalTrackOptions;
|
||||
dominantSpeaker?: boolean;
|
||||
iceServers?: RTCIceServer[];
|
||||
iceServersTimeout?: number;
|
||||
iceTransportPolicy?: RTCIceTransportPolicy;
|
||||
@@ -476,6 +479,7 @@ export interface ConnectOptions {
|
||||
maxAudioBitRate?: number | null;
|
||||
maxVideoBitRate?: number | null;
|
||||
name?: string | null;
|
||||
networkQuality?: boolean;
|
||||
preferredAudioCodecs?: AudioCodec[];
|
||||
preferredVideoCodecs?: VideoCodec[] | VideoCodecSettings[];
|
||||
logLevel?: LogLevel | LogLevels;
|
||||
|
||||
@@ -8,7 +8,13 @@ let localAudioTrack: Video.LocalAudioTrack | null = null;
|
||||
|
||||
async function initRoom() {
|
||||
// Connect to Twilio without creating audio and video track
|
||||
room = await Video.connect('$TOKEN', { name: 'room-name', video: false, audio: false });
|
||||
room = await Video.connect('$TOKEN', {
|
||||
name: 'room-name',
|
||||
video: false,
|
||||
audio: false,
|
||||
dominantSpeaker: true,
|
||||
networkQuality: true
|
||||
});
|
||||
// Create local video track from default input
|
||||
localVideoTrack = await Video.createLocalVideoTrack({ name: 'camera' });
|
||||
// Create local audio track from default input
|
||||
|
||||
Reference in New Issue
Block a user