mediacapture-record icon indicating copy to clipboard operation
mediacapture-record copied to clipboard

Ensure that the error event is the last event to be fired

Open foolip opened this issue 9 years ago • 4 comments

http://w3c.github.io/mediacapture-record/MediaRecorder.html#general-principles

If recording has been started and not yet stopped when the error occurs, then after raising the error, the UA must fire a dataavailable event, containing any data that it has gathered, and then a stop event.

This seems odd, it will mean that sometimes there will be data after the error event and sometimes there will not. How about instead requiring that if there is any data, that the dataavailable event be fired before the error event? Assuming that both the data and the error originates from the same bits of code then that ought to also match the actual order things happen in.

foolip avatar Apr 13 '16 12:04 foolip

I agree, but this seems to be implemented by both Gecko (here and here -- note that the error is not followed by an return NS_ERROR_FAILURE) and Chromium (here).

The Section is now non-normative. What do you think we should do?

yell0wd0g avatar Nov 03 '16 18:11 yell0wd0g

Just changing the order of the events there should fix the problem, implementation-wise I guess it's simple enough?

foolip avatar Nov 09 '16 22:11 foolip

@foolip, I think I should homogenise all these sequences so that the Error event is the last one; potentially after an ondataavailable event and/or an onstop event, sgty?

yell0wd0g avatar Dec 21 '16 00:12 yell0wd0g

Yep, firing the error event last is exactly what I'm asking for :)

foolip avatar Feb 14 '17 10:02 foolip