From e7d64b089356a51b2c5882713a02ecff86d4c289 Mon Sep 17 00:00:00 2001 From: youennf Date: Wed, 17 Oct 2018 22:26:30 -0700 Subject: [PATCH] Explicit description of the case of a track being added/removed while recording (#152) Relates to https://github.com/w3c/mediacapture-record/issues/151 --- MediaRecorder.bs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/MediaRecorder.bs b/MediaRecorder.bs index e72e6cc0..d39fcc0a 100644 --- a/MediaRecorder.bs +++ b/MediaRecorder.bs @@ -218,8 +218,21 @@ interface MediaRecorder : EventTarget { +
  • If at any point, a track is added to or removed from the {{MediaRecorder/stream}}'s + track set, the UA MUST immediately stop gathering data, discard any data that it has gathered, + and queue a task, using the DOM manipulation task source, that runs the following steps: +
      +
    1. Set {{state}} to {{inactive}}.
    2. +
    3. Fire an error event named {{InvalidModificationError}} at + target.
    4. +
    5. Fire a blob event named + dataavailable at target with blob.
    6. +
    7. Fire an event named stop at target.
    8. +
    +
  • +
  • If the UA at any point is unable to continue gathering data for - reasons other than isolation properties, it MUST stop gathering data, and + reasons other than isolation properties or stream track set, it MUST stop gathering data, and queue a task, using the DOM manipulation task source, that runs the following steps: