File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -443,10 +443,26 @@ class UserMedia extends Despot {
443443 } else {
444444 rawHeight = this . getVideoHeight ( ) ;
445445
446- if ( ! rawHeight || rawHeight < 1 ) {
446+ if ( rawHeight === undefined ) {
447+ throw createError ( {
448+ message : "Bad dimensions" ,
449+ explanation : "Raw video height from DOM element cannot be undefined." ,
450+ options : this . options ,
451+ } ) ;
452+ }
453+
454+ if ( rawHeight === 0 ) {
455+ throw createError ( {
456+ message : "Bad dimensions" ,
457+ explanation : "Raw video height from DOM element cannot be zero." ,
458+ options : this . options ,
459+ } ) ;
460+ }
461+
462+ if ( rawHeight < 1 ) {
447463 throw createError ( {
448464 message : "Bad dimensions" ,
449- explanation : "Raw video height from DOM element cannot be less than 1! " ,
465+ explanation : "Raw video height from DOM element cannot be less than 1. " ,
450466 options : this . options ,
451467 } ) ;
452468 }
You can’t perform that action at this time.
0 commit comments