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 +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -202,10 +202,21 @@ export class MediaStreamFactory {
202
202
if ( constraints . video . resolution &&
203
203
constraints . video . resolution . width &&
204
204
constraints . video . resolution . height ) {
205
- mediaConstraints . video . width =
206
- constraints . video . resolution . width ;
207
- mediaConstraints . video . height =
208
- constraints . video . resolution . height ;
205
+ if ( constraints . video . source ===
206
+ MediaFormatModule . VideoSourceInfo . SCREENCAST ) {
207
+ mediaConstraints . video . width =
208
+ constraints . video . resolution . width ;
209
+ mediaConstraints . video . height =
210
+ constraints . video . resolution . height ;
211
+ } else {
212
+ mediaConstraints . video . width = Object . create ( { } ) ;
213
+ mediaConstraints . video . width . exact =
214
+ constraints . video . resolution . width ;
215
+ mediaConstraints . video . height = Object . create ( { } ) ;
216
+ mediaConstraints . video . height . exact =
217
+ constraints . video . resolution . height ;
218
+
219
+ }
209
220
}
210
221
if ( typeof constraints . video . deviceId === 'string' ) {
211
222
mediaConstraints . video . deviceId = { exact : constraints . video . deviceId } ;
You can’t perform that action at this time.
0 commit comments