export class MediaUtils { static checkStream ( tracks , state ) { return tracks . filter ( ( t ) => { return t . readyState === state ; } ) ? true : false ; } returns { Promise < Array < MediaDeviceInfo > > } memberof static getMediaDevices ( ) { return new Promise < Array < MediaDeviceInfo > > ( ( resolve , reject ) => { navigator . mediaDevices . enumerateDevices ( ) . then ( ( devices ) => { resolve ( devices ) ; } ) . catch ( reject ) ; } ) ; } ; }