W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > May 2017

Re: [mediacapture-record] Should stop(), pause(), resume() change state synchronously?

From: Philip Jägenstedt via GitHub <sysbot+gh@w3.org>
Date: Mon, 15 May 2017 11:26:10 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-301448204-1494847569-sysbot+gh@w3.org>
When the actual state isn't synchronously available, then I think there are two options for methods and setters that affect state:
* Pretend that the state changes synchronously anyway, and queue a task to fire events. Media elements mostly work like this.
* Instead wait for the real change to complete, and change the state + fire the event at the same time once done. It means one has to deal with different operations racing to complete, or have a queue of operations.

It sounds like there's a mix here, and that it's mostly async. So perhaps best to make everything async. If you ever want these methods to return promises, that'll make more sense too. (When done: change state, resolve promise, fire event.)

-- 
GitHub Notification of comment by foolip
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/issues/123#issuecomment-301448204 using your GitHub account
Received on Monday, 15 May 2017 11:26:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:32 UTC