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

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

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Fri, 12 May 2017 02:35:42 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issues.opened-228172369-1494556540-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-record:

== Should stop(), pause(), resume() change state synchronously? ==
With the exception of [start()](https://w3c.github.io/mediacapture-record/MediaRecorder.html#dom-mediarecorder-start), which sets `state` to `"recording"` synchronously, all the other state-changing methods, stop(), pause(), resume(), set `state` asynchronously, in the queued task that fires the corresponding event.

Do we have a good reason for this? I'm asking because both Chrome and Firefox appear to set `state` synchronously, and fire the event asynchronously. Try it [here](https://jsfiddle.net/jib1/tmufhavj/).

We're [adding `pause` and `resume` events to Firefox](https://bugzil.la/1363915), and aren't sure what to do.

Full disclosure: I fixed the start() method in https://github.com/w3c/mediacapture-record/pull/56. The spec seemed confused about this before then, throwing exceptions in queued tasks.

cc @foolip, @SingingTree

Please view or discuss this issue at https://github.com/w3c/mediacapture-record/issues/123 using your GitHub account
Received on Friday, 12 May 2017 02:35:48 UTC

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