Re: [mediacapture-record] Make stop() idempotent.

pause() and resume() are already idempotent in the spec. I.e.
```js
rec.start();
rec.pause();
rec.pause();
rec.resume();
rec.resume();
```
does not throw according to the spec and Chrome (Firefox throws `InvalidStateError`). See [fiddle](https://jsfiddle.net/jib1/9xdzcfer/).

My rationale for `stop()` being idempotent as well is that otherwise the above fiddle would behave unexpectedly and sometimes throw, if, instead of a camera, the source were e.g. a video file of finite length. Basically, it would throw if the video file's duration was <6 seconds, and not throw if it was >6 seconds. Basically `ended` racing with `stop()`.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/issues/125#issuecomment-308548967 using your GitHub account

Received on Wednesday, 14 June 2017 20:29:54 UTC