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

Conflict on resuming context #642

Closed
hoch opened this issue Oct 20, 2015 · 10 comments
Closed

Conflict on resuming context #642

hoch opened this issue Oct 20, 2015 · 10 comments

Comments

@hoch
Copy link
Member

hoch commented Oct 20, 2015

Here is the behavior on resuming a realtime context.

The promise is rejected if the context has been closed. If the context is not currently suspended, the promise will resolve.

For offline context, we have

If the context is not currently suspended or the rendering has not started, the promise is rejected with InvalidStateError.

Which one is more reasonable?

@mdjp mdjp modified the milestone: Uncommitted Oct 21, 2015
@padenot
Copy link
Member

padenot commented Oct 22, 2015

The first behaviour has been shipping for some time, I'd say we can't really change it now.

@hoch hoch self-assigned this Oct 22, 2015
@hoch
Copy link
Member Author

hoch commented Oct 22, 2015

I agree. @rtoy WDYT?

@rtoy
Copy link
Member

rtoy commented Oct 22, 2015

Yeah, I wouldn't want to change the existing online context behavior of resume.

I don't have any objections if resume on offline contexts behaves differently. The use cases are different and suspend is already different (time arg required).

@hoch
Copy link
Member Author

hoch commented Oct 22, 2015

Honestly, resuming a running context is not that really meaningful. Especially In OfflineAudioContext, changing audio graph or scheduling things will be done much faster than realtime, so doing something after the resuming is not the recommended usage.

@joeberkovitz
Copy link
Contributor

TPAC 2015: Change the behavior of OfflineAudioContext to match the online one, i.e. resolve the promise if the context is in a running state and reject only if it is closed.

Since both AudioContexts will now inherit from a single interface it would be strange to vary this behavior even though the use cases are somewhat different.

@joeberkovitz joeberkovitz modified the milestones: Web Audio V1, Uncommitted Oct 27, 2015
@hoch
Copy link
Member Author

hoch commented Oct 29, 2015

I forgot to bring up another question: what should we do about resuming a context that has not been started?

I think we should reject the promise.

@padenot
Copy link
Member

padenot commented Oct 30, 2015

Yes, for the Offline case. For the online case, this would behave normally, but is kind of useless.

@hoch
Copy link
Member Author

hoch commented Feb 11, 2016

For this issue, PR #656 is on the review.

@hoch
Copy link
Member Author

hoch commented Jan 5, 2017

The spec has changed and the PR #656 is not applicable any more. I am removing In the PR Review label.

@hoch hoch removed the In PR Review label Jan 5, 2017
@hoch
Copy link
Member Author

hoch commented Apr 11, 2017

Oh, I forgot to close this: #1096.

@hoch hoch closed this as completed Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants