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

Fix #1162: MediaStream to continue when context is closed #1285

Merged
merged 3 commits into from
Aug 31, 2017

Conversation

rtoy
Copy link
Member

@rtoy rtoy commented Aug 9, 2017

When a context is closed any MediaStreams or HTMLMediaElements are
effectively disconnected from the context and continue as if they were
never connected.

When a context is closed any MediaStreams or HTMLMediaElements are
effectively disconnected from the context and continue as if they were
never connected.
@rtoy rtoy requested review from joeberkovitz and padenot August 9, 2017 20:09
@rtoy
Copy link
Member Author

rtoy commented Aug 9, 2017

PTAL. Not sure about the most effective way to state what we want.

@padenot
Copy link
Member

padenot commented Aug 10, 2017

This means that if AudioContext.close is called, the HTMLMediaElement will start outputing audio to the speakers again, if it was captured with AudioContext.createMediaElementSource. The alternative is to have the frames dropped for ever.

If authors want more flexibility, they can use HTMLMediaelement.captureStream instead. This allows controlling everything manually.

Also it's a bit unclear what connect and disconnect mean, but I think agreeing on the behaviour is more important.

fwiw, https://w3c.github.io/mediacapture-fromelement/#dom-htmlmediaelement-capturestream() has language elements we could have a look at when drafting the spec for createMediaElementSource.

@rtoy rtoy changed the title Fix #1162: MediaStream's continue when context is closed Fix #1162: MediaStream to continue when context is closed Aug 31, 2017
@rtoy rtoy merged commit 001e7eb into WebAudio:gh-pages Aug 31, 2017
rtoy added a commit to rtoy/web-audio-api that referenced this pull request Sep 6, 2017
@WofWca
Copy link

WofWca commented Nov 26, 2021

Not an expert, but tbh this makes AudioContext.createMediaElementSource() look straight up inferior to HTMLMediaElement.captureStream().

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

Successfully merging this pull request may close these issues.

4 participants