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 {
181
181
} ;
182
182
}
183
183
} 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
+ }
185
189
}
186
190
if ( typeof constraints . audio === 'object' &&
187
191
constraints . audio . source ===
@@ -198,11 +202,9 @@ export class MediaStreamFactory {
198
202
if ( constraints . video . resolution &&
199
203
constraints . video . resolution . width &&
200
204
constraints . video . resolution . height ) {
201
- mediaConstraints . video . width = Object . create ( { } ) ;
202
- mediaConstraints . video . width . exact =
205
+ mediaConstraints . video . width =
203
206
constraints . video . resolution . width ;
204
- mediaConstraints . video . height = Object . create ( { } ) ;
205
- mediaConstraints . video . height . exact =
207
+ mediaConstraints . video . height =
206
208
constraints . video . resolution . height ;
207
209
}
208
210
if ( typeof constraints . video . deviceId === 'string' ) {
You can’t perform that action at this time.
0 commit comments