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

Implement MediaStreamTrack.enabled #1052

Open
midatindex0 opened this issue Feb 23, 2024 · 3 comments
Open

Implement MediaStreamTrack.enabled #1052

midatindex0 opened this issue Feb 23, 2024 · 3 comments

Comments

@midatindex0
Copy link

I'm looking to use the MediaStreamTrack.enabled feature for a project of mine.

There were 2 issues related to this feature in the past (#718, #264) but both of them are now stale and closed without any updates.

Are there any plans to implement this in the near future? If not then i can try implementing this and creating a PR if someone points me in the right direction on where to start and tests to include (if any).

I also have some doubts about how this option will work. When enabled is set to False, will the track still be consumed but only black/silenced frames are sent or will the track be somehow "paused" till enabled is set to True again.

Refs: https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/enabled

Thanks for your hard work!

@jlaine
Copy link
Collaborator

jlaine commented Mar 11, 2024

I really don't know how this would work, mostly because I don't have a good insight into how other media pipelines are implemented. Feel free to do some research on the topic and post your findings.

Also could you please elaborate on your usecase? What kind of track are you trying to "disable"?

@midatindex0
Copy link
Author

My usecase is just pausing/resuming a media track that i send to mediasoup. To be more precise, I'm making a live music streaming bot for another project of mine and i was looking into how to implement the pause/resume functionality.

@jlaine
Copy link
Collaborator

jlaine commented Mar 25, 2024

If it's a matter of sending/not sending audio you should be able to:

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

2 participants