Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1582407] Fix MediaRecorder-pause-resume.html to avoid start() ambiguities. #19502

Merged
merged 1 commit into from Oct 4, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

The spec allows for MediaRecorder.start() to hold the "start" event until it
has collected some actual data. This means "pause" and "resume" events can occur
before "start", on the contrary of this testcase.

This patch avoids this ambiguity by:

  1. Drawing a frame to the canvas so that the track contains some real data.
  2. Wait for "start" before pause()ing, to ensure "start" comes first.

Note that without 1), 2) could wait indefinitely, resulting in a timeout.

Differential Revision: https://phabricator.services.mozilla.com/D46470

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1582407
gecko-commit: d7ab956c296257c99630aa0d4e91d41434c55137
gecko-integration-branch: autoland
gecko-reviewers: jib

The spec allows for MediaRecorder.start() to hold the "start" event until it
has collected some actual data. This means "pause" and "resume" events can occur
before "start", on the contrary of this testcase.

This patch avoids this ambiguity by:
1) Drawing a frame to the canvas so that the track contains some real data.
2) Wait for "start" before pause()ing, to ensure "start" comes first.

Note that without 1), 2) could wait indefinitely, resulting in a timeout.

Differential Revision: https://phabricator.services.mozilla.com/D46470

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1582407
gecko-commit: d7ab956c296257c99630aa0d4e91d41434c55137
gecko-integration-branch: autoland
gecko-reviewers: jib
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@moz-wptsync-bot moz-wptsync-bot merged commit 6baeb70 into master Oct 4, 2019
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1582407 branch October 4, 2019 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants