Hi
I have been testing stream recordings across various browsers to confirm they're working and found that an error is thrown when trying to publish a stream on Safari (12.1):
OverconstrainedError: {message: "Invalid constraint", constraint: "width"}
It turns out this this occurs when trying to call: navigator.getUserMedia(constraints)
When passing through the width and height constraints for the video, Safari kicks back if the width or height aren't exact numeric data types, for example:
The reason I bring this up is is because when creating a stream through the Flashphoner API, I set the video constraints to be {width: 320, height: 240} but by the time it reaches the point where it calls getUserMedia(), the constraints are changed to have the 'min' and 'max' properties and thus throws an error.
I would like to know if there's any way to stop the constraints from being overridden and having the 'min' and 'max' properties on it?
Cheers,
Taylor
I have been testing stream recordings across various browsers to confirm they're working and found that an error is thrown when trying to publish a stream on Safari (12.1):
OverconstrainedError: {message: "Invalid constraint", constraint: "width"}
It turns out this this occurs when trying to call: navigator.getUserMedia(constraints)
When passing through the width and height constraints for the video, Safari kicks back if the width or height aren't exact numeric data types, for example:
- getUserMedia({video: {width: {min:320, max:320}, height: {min:240, max:240}}}) - Fails on Safari, but works fine on Chrome.
- getUserMedia({video: {width:320, height:240}}) - Works fine on both Safari and Chrome.
The reason I bring this up is is because when creating a stream through the Flashphoner API, I set the video constraints to be {width: 320, height: 240} but by the time it reaches the point where it calls getUserMedia(), the constraints are changed to have the 'min' and 'max' properties and thus throws an error.
I would like to know if there's any way to stop the constraints from being overridden and having the 'min' and 'max' properties on it?
Cheers,
Taylor