Closed
Bug 1496383
Opened 7 years ago
Closed 7 years ago
MediaRecorder state error cases does not match its W3C spec
Categories
(Core :: Audio/Video: Recording, defect, P2)
Core
Audio/Video: Recording
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: k.bumsik, Assigned: k.bumsik)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Steps to reproduce:
In the MediaRecorder implementation (dom/media/MediaRecorder.cpp), specifically MediaRecorder.pause() and MediaRecorder.resume(), conditions of NS_ERROR_DOM_INVALID_STATE_ERR does not match to the W3C MediaRecorder spec: https://w3c.github.io/mediacapture-record/#dom-mediarecorder-pause . I am currently writing a patch to resolve it.
Actual results:
In Firefox implementation (in dom/media/MediaRecorder.cpp):
pause(): if (state != Recording) => NS_ERROR_DOM_INVALID_STATE_ERR
resume(): if (state != Paused) => NS_ERROR_DOM_INVALID_STATE_ERR
Expected results:
W3C standard states:
pause(): if (state == inactive) => NS_ERROR_DOM_INVALID_STATE_ERR
resume(): if (state == inactive) => NS_ERROR_DOM_INVALID_STATE_ERR
Assignee | ||
Updated•7 years ago
|
Component: Untriaged → Audio/Video: Recording
Product: Firefox → Core
Comment 1•7 years ago
|
||
Make sure to let us know when you have a patch ready, thanks!
Assignee: nobody → k.bumsik
Priority: -- → P2
Assignee | ||
Comment 2•7 years ago
|
||
Fix a bug that the current MediaRecorder's state error cases does not match the W3C spec.
pause() and resume() should throw an INVAILD_STATE_ERR only when it is inactive state, making them
idempotent.
Simply changing if statements are enough because the underlying encoder object (TrackEncoder) will
ignore Suspend/Resume calls when it is already suspended/recording so there won't be side-effects by
multiple pause()/resume() calls.
Updated•7 years ago
|
QA Contact: drno
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a3a767ad55fb
Fix state error cases of MediaRecorder to match the W3C spec r=jya
Keywords: checkin-needed
Comment 4•7 years ago
|
||
bugherder |
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•