jhuckaby / webcamjs

HTML5 Webcam Image Capture Library with Flash Fallback
MIT License
2.5k stars 1.11k forks source link

Video doesn't fill container in Edge and FireFox #219

Closed OasisLiveForever closed 7 years ago

OasisLiveForever commented 7 years ago

In version 1.0.20 has been changed getUserMedia video initialization from:

this.mediaDevices.getUserMedia({ "audio": false, "video": this.params.constraints || {
mandatory: { minWidth: this.params.dest_width, minHeight: this.params.dest_height } } })

to: this.mediaDevices.getUserMedia({ "audio": false, "video": this.params.constraints || { width: this.params.dest_width, height: this.params.dest_height } })

This change causes video to not fill container in Edge and FireFox. On IE 11 and Chrome works correctly.

jhuckaby commented 7 years ago

I apologize, I didn't mean to create any issues with this change. The old mandatory syntax is deprecated, and isn't even listed on the MDN documentation anymore. I thought changing to the new format would be ideal for all browsers. However, no matter what settings I try now seems to upset one browser or another. There doesn't seem to be one single setting that satisfies them all.

I will revert the change, and go back to the old mandatory thing.