export default async ( sourceID , width = undefined , height = undefined , minSizeMultiplier = 1 , maxSizeMultiplier = 1 , minFrameRate = 15 , maxFrameRate = 60 ) => { if ( width && height ) { return navigator . mediaDevices . getUserMedia ( { audio : false , video : { mandatory : { chromeMediaSource : 'desktop' , chromeMediaSourceId : sourceID , minWidth : width * minSizeMultiplier , maxWidth : width * maxSizeMultiplier , minHeight : height * minSizeMultiplier , maxHeight : height * maxSizeMultiplier , minFrameRate , maxFrameRate , } , } , } ) ; } return navigator . mediaDevices . getUserMedia ( { audio : false , video : { mandatory : { chromeMediaSource : 'desktop' , chromeMediaSourceId : sourceID , minFrameRate , maxFrameRate , } , } , } ) ; } ;