Skip to content

Commit 8b9230c

Browse files
author
timmydoza
authored
Upgrade twilio-video to 2.11.0 (#409)
Remove @types/twilio-video Update types.ts file
1 parent 3646bca commit 8b9230c

File tree

3 files changed

+5
-32
lines changed

3 files changed

+5
-32
lines changed

package-lock.json

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@types/react": "^16.9.19",
1515
"@types/react-dom": "^16.9.5",
1616
"@types/react-router-dom": "^5.1.3",
17-
"@types/twilio-video": "^2.7.0",
1817
"concurrently": "^5.1.0",
1918
"cross-env": "^7.0.2",
2019
"d3-timer": "^1.0.10",
@@ -32,7 +31,7 @@
3231
"react-scripts": "^3.4.4",
3332
"strip-color": "^0.1.0",
3433
"twilio": "^3.39.3",
35-
"twilio-video": "^2.9.0",
34+
"twilio-video": "^2.11.0",
3635
"typescript": "^3.8.3"
3736
},
3837
"devDependencies": {

src/types.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,12 @@ import { LocalVideoTrack, RemoteVideoTrack, TwilioError } from 'twilio-video';
22
import { EventEmitter } from 'events';
33

44
declare module 'twilio-video' {
5-
interface LocalParticipant {
6-
setBandwidthProfile: (bandwidthProfile: BandwidthProfileOptions) => void;
7-
publishTrack(track: LocalTrack, options?: { priority: Track.Priority }): Promise<LocalTrackPublication>;
8-
}
9-
10-
interface VideoCodecSettings {
11-
simulcast?: boolean;
12-
}
13-
14-
interface LocalTrackPublication {
15-
setPriority: (priority: Track.Priority) => void;
16-
}
17-
5+
// These help to create union types between Local and Remote VideoTracks
186
interface LocalVideoTrack {
197
isSwitchedOff: undefined;
208
setPriority: undefined;
219
}
2210

23-
interface RemoteVideoTrack {
24-
isSwitchedOff: boolean;
25-
setPriority: (priority: Track.Priority | null) => void;
26-
}
27-
28-
interface VideoBandwidthProfileOptions {
29-
trackSwitchOffMode?: 'predicted' | 'detected' | 'disabled';
30-
}
31-
3211
function testPreflight(
3312
subscriberToken: string,
3413
publisherToken: string,

0 commit comments

Comments
 (0)