This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ export default class MediaDeviceHandler extends EventEmitter {
5050 return devices . some ( d => Boolean ( d . label ) ) ;
5151 }
5252
53+ // Gets the available audio input/output and video input devices
54+ // from the browser: a thin wrapper around mediaDevices.enumerateDevices()
55+ // that also returns results by type of devices.
56+ // Note that common browser behaviour is for enumerateDevices() to not require
57+ // user media permission, but if you don't have user media permission, all the
58+ // all device names will be the empty string. If you care about device names,
59+ // call and wait for requestPermission() above.
5360 public static async getDevices ( ) : Promise < IMediaDevices > {
54- // Only needed for Electron atm, though should work in modern browsers
55- // once permission has been granted to the webapp
56-
5761 try {
5862 const devices = await navigator . mediaDevices . enumerateDevices ( ) ;
5963 const output = {
Original file line number Diff line number Diff line change @@ -762,8 +762,8 @@ export class ElementCall extends Call {
762762 ) : Promise < void > {
763763 try {
764764 await this . messaging ! . transport . send ( ElementWidgetActions . JoinCall , {
765- audioInput : audioInput ?. deviceId ?? null ,
766- videoInput : videoInput ?. deviceId ?? null ,
765+ audioInput : audioInput ?. label ?? null ,
766+ videoInput : videoInput ?. label ?? null ,
767767 } ) ;
768768 } catch ( e ) {
769769 throw new Error ( `Failed to join call in room ${ this . roomId } : ${ e } ` ) ;
You can’t perform that action at this time.
0 commit comments