Invalid Constraint Error on specific version of iMac - Safari

Taylor

Member
Hi

I've currently been trying to test Flashphoner with iMac - Safari and am currently getting this error (see image attached):
Code:
OverconstrainedError {message: "invalid constraint", constraint: "width"}
.

This was originally raised in this thread and was fixed shortly afterwards (in WCS version 5.2.108):
https://forum.flashphoner.com/threads/invalid-constraint-when-publishing-stream-safari-12-1.12004/

Although this issue came back at some point and it began to mess with Safari on Mac again, so we decided to stay on WCS 5.2.108.

When we upgraded the WCS version to 5.2.267 through the AWS Marketplace, we had the same issue again with Mac - Safari, however we also tested on other Mac devices and found that others managed to go through fine.

On iMacs the Overconstrained Error only appears in Safari, other browsers work fine.
On MacBooks it seems to work on all browsers including Safari.

I've included some details about the two iMacs and one MacBook below (again works on MacBook, not on iMacs). I have a hunch that it's an issue with the camera on the iMac in combination with the Safari browser but I am yet unsure.

WCS version: 5.2.267 (018743542d11cabedb2fdc2dd34e1fc68e676158)
Flashphoner version: 0.5.28.2753-155fd22204126ad44418ad42c7d26986f6d27cc6

Any assistance on why this is happening would be greatly appreciated.

Cheers,
Taylor
 

Attachments

Max

Administrator
Staff member
Good day.
This is a known issue described here (point 8)
You should either use only resolutions which passes WebRTC Camera Resolution test on iMac or disable resolution constraints normalization and set width and height as ideal as described here, for example:
Code:
publishStream = session.createStream({
    ...
    disableConstraintsNormalization: true,
    constraints {
        video: {
            width: {ideal: 1024},
            height: {ideal: 768}
        },
        audio: true
    }
}).on(STREAM_STATUS.PUBLISHING, function (publishStream) {
    ...
});
publishStream.publish();
 

Taylor

Member
Hi Max

Thank you for your help, following the tip in point 8 managed to fix the issue related to Safari.
 
Top