Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get OverconstainedError in Azure #37

Open
toddmueller opened this issue Nov 13, 2023 · 2 comments
Open

Get OverconstainedError in Azure #37

toddmueller opened this issue Nov 13, 2023 · 2 comments

Comments

@toddmueller
Copy link

When I deploy my app to an Azure Web App (Linux), I receive the following error when launching the camera:

Uncaught (in promise) OverconstrainedError
Promise.then (async)
start @ CameraStreamer.js:60
(anonymous) @ blazor.server.js:1
beginInvokeJSFromDotNet @ blazor.server.js:1
_invokeClientMethod @ blazor.server.js:1
_processIncomingData @ blazor.server.js:1
Ft.connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1
InstrumentHooks.js:97

I have the framework set as .NET 7, and everything works well locally. Could this be an issue running Linux?

@toddmueller
Copy link
Author

I noticed in Azure deviceId from 'this._constraints' object is null, where locally, it's populated.

navigator.mediaDevices.getUserMedia(this._constraints).then(mediaStream => {

@toddmueller
Copy link
Author

Issue is now resolved.

By default, I have the camera off when the page is loaded. When a user clicks an icon, I load the camera and I need to load it up like this:

private async void Start()
{
    await JSRuntime.InvokeVoidAsync("toggleModal", "modal-id");

    isHidden = !isHidden;

    if (await CameraStreamerReference.GetCameraAccessAsync())
    {
        await CameraStreamerReference.ReloadAsync();

        await CameraStreamerReference.StartAsync();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant