This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,11 @@ export class MediaStreamFactory {
181181 } ;
182182 }
183183 } else {
184- mediaConstraints . audio = constraints . audio ;
184+ if ( constraints . audio . source === MediaFormatModule . AudioSourceInfo . SCREENCAST ) {
185+ mediaConstraints . audio = true ;
186+ } else {
187+ mediaConstraints . audio = constraints . audio ;
188+ }
185189 }
186190 if ( typeof constraints . audio === 'object' &&
187191 constraints . audio . source ===
@@ -198,11 +202,9 @@ export class MediaStreamFactory {
198202 if ( constraints . video . resolution &&
199203 constraints . video . resolution . width &&
200204 constraints . video . resolution . height ) {
201- mediaConstraints . video . width = Object . create ( { } ) ;
202- mediaConstraints . video . width . exact =
205+ mediaConstraints . video . width =
203206 constraints . video . resolution . width ;
204- mediaConstraints . video . height = Object . create ( { } ) ;
205- mediaConstraints . video . height . exact =
207+ mediaConstraints . video . height =
206208 constraints . video . resolution . height ;
207209 }
208210 if ( typeof constraints . video . deviceId === 'string' ) {
You can’t perform that action at this time.
0 commit comments