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

[Bug]: Shutting down camera is not possible until destroy and should also work with removeStream #16

Open
victorfunes opened this issue Mar 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@victorfunes
Copy link

Version

0.2.2

Environment that reproduces the issue

Device: intel laptop
OS: Windows 11
Chrome 111.0.5563.65 (Build oficial) (64 bits)

Is it reproducible in the example application?

Yes

Reproduction steps

Using your demo app: https://record.a.video/
Add stream > Add screencast + rounded webcam
Delete cam stream (using the trash button)
The light of the camera continues being on and shouldn't.

I also tried after removing the stream stop the streams manually from outside:
getTracks().forEach((track) => track.stop());

But it still keeps the camera open.
It is only released when calling destroy() function.

Expected result

In my opinion the stream lifecicle should be managed from outside of the component, so:
When a stream is removed from the component it should completely release all the resources, even before the destroy.

Actual result

Currently the camera light continues being turned on until destroy the component

Additional context

No response

Relevant logs output

No response

@victorfunes victorfunes added the bug Something isn't working label Mar 15, 2023
@bhelzer
Copy link

bhelzer commented Mar 23, 2023

In addition calling destroy fails if stopRecording has been called previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants