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

changeCamera not working when using constraints #20

Open
rttmax opened this issue Aug 29, 2023 · 0 comments
Open

changeCamera not working when using constraints #20

rttmax opened this issue Aug 29, 2023 · 0 comments

Comments

@rttmax
Copy link

rttmax commented Aug 29, 2023

simple-vue-camera.umd.js:198 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'exact')
at simple-vue-camera.umd.js:198:56

When I add constraints to the camera component via prop, I can no longer switch between cameras.

<camera
    ref="camera"
    @loading="logEvent('loading')"
    @started="logEvent('started')"
    @error="(error) => logEvent('error: ' + error)"
    :constraints="{ video: { width: 500, height: 500 } }"
>
</camera>

It can be fixed by adding deviceId : {} to the constraints:
:constraints="{ video: { width: 500, height: 500, deviceId : {} }}"

I don't see the reason why deviceId should be part of the contrainst. But maybe I'm missing something

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