Skip to content

Commit

Permalink
Use getSettings instead of getCapabilities to fix FF error (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmydoza authored May 21, 2021
1 parent e751ef0 commit 84a59ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__mocks__/twilio-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const mockRoom = new MockRoom();
class MockTrack extends EventEmitter {
kind = '';
stop = jest.fn();
mediaStreamTrack = { getCapabilities: () => ({ deviceId: 'mockDeviceId' }) };
mediaStreamTrack = { getSettings: () => ({ deviceId: 'mockDeviceId' }) };

constructor(kind: string) {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function useLocalTracks() {
// in cases where the user's video is disabled.
window.localStorage.setItem(
SELECTED_VIDEO_INPUT_KEY,
newVideoTrack.mediaStreamTrack.getCapabilities().deviceId ?? ''
newVideoTrack.mediaStreamTrack.getSettings().deviceId ?? ''
);
}
if (newAudioTrack) {
Expand Down

0 comments on commit 84a59ad

Please sign in to comment.