Throw when the MediaStream passed to MediaStreamAudioSourceNode does not have an audio track, and implement the correct behaviour

NEW
Assigned to

Status

()

defect
P3
normal
26 days ago
4 days ago

People

(Reporter: padenot, Assigned: padenot, NeedInfo)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 affected)

Details

Attachments

(2 attachments)

Assignee

Description

26 days ago

We need to take the first track alphabetically, basically.

Assignee

Comment 1

25 days ago

It's not complete I think, but it covers the constructor and some bits of
behaviour.

Assignee

Comment 2

25 days ago

It should pick and lock to the right track, regardless of if it's still in the
MediaStream.

The test fix is because we don't expose tracks until the HTMLMediaElement has
loaded loading I think.

This alignes with a couple spec changes:

and also throws when no valid track are found in the MediaStream, either because
it's all video tracks or because it has no tracks.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task
Assignee

Updated

23 days ago
Type: task → defect
Assignee

Updated

23 days ago
Blocks: 1553819

Comment 4

6 days ago
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/80181b642f81
Start testing MediaStreamAudioSourceNode in WPT. r=karlt,pehrsons
https://hg.mozilla.org/integration/autoland/rev/71154c8ef814
Implement the correct behaviour for MediaStreamAudioSource.  r=karlt,pehrsons
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17255 for changes under testing/web-platform/tests
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR https://github.com/web-platform-tests/wpt/pull/17255
* Taskcluster (pull_request) (https://tools.taskcluster.net/task-group-inspector/#/NvEH3Cd7RCyeeAAoi3J4zA)

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=71154c8ef814a3e6b10c9789325d4ed5529cf641&tochange=bb2560cbaecfd954eb0f2c14948c95a03ff12f09&searchStr=mda%2Cwindows&group_state=expanded&selectedJob=250959379

Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=250959379&repo=autoland&lineNumber=60076
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=250958537&repo=autoland&lineNumber=49874

Backout link: https://hg.mozilla.org/integration/autoland/rev/bb2560cbaecfd954eb0f2c14948c95a03ff12f09

17:38:42 INFO - TEST-PASS | dom/media/webaudio/test/test_audioContextSuspendResumeClose.html | An exception was not thrown
17:38:42 INFO - Buffered messages finished
17:38:42 INFO - TEST-UNEXPECTED-FAIL | dom/media/webaudio/test/test_audioContextSuspendResumeClose.html | An exception was not thrown
17:38:42 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:275:18
17:38:42 INFO - expectNoException@dom/media/webaudio/test/webaudio.js:22:3
17:38:42 INFO - tryToCreateNodeOnClosedContext/<@dom/media/webaudio/test/test_audioContextSuspendResumeClose.html:44:7
17:38:42 INFO - tryToCreateNodeOnClosedContext@dom/media/webaudio/test/test_audioContextSuspendResumeClose.html:37:40
17:38:42 INFO - afterResume/<@dom/media/webaudio/test/test_audioContextSuspendResumeClose.html:308:7
17:38:42 INFO - TEST-PASS | dom/media/webaudio/test/test_audioContextSuspendResumeClose.html | The context is in closed stat

[task 2019-06-10T17:44:36.782Z] 17:44:36 INFO - TEST-OK | /webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-ctor.html | took 1490ms
[task 2019-06-10T17:44:36.783Z] 17:44:36 INFO - TEST-START | /webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html
[task 2019-06-10T17:44:36.791Z] 17:44:36 INFO - Closing window 6442450945
[task 2019-06-10T17:44:36.835Z] 17:44:36 INFO - PID 3017 | [Child 3097, Main Thread] WARNING: No active window: file /builds/worker/workspace/build/src/js/xpconnect/src/XPCJSContext.cpp, line 662
[task 2019-06-10T17:44:36.851Z] 17:44:36 INFO - PID 3017 | [Parent 3017, Main Thread] WARNING: '!mSelection', file /builds/worker/workspace/build/src/editor/libeditor/EditorBase.cpp, line 4893
[task 2019-06-10T17:44:36.851Z] 17:44:36 INFO - PID 3017 | [Parent 3017, Main Thread] WARNING: '!editActionData.CanHandle()', file /builds/worker/workspace/build/src/editor/libeditor/EditorBase.cpp, line 1302
[task 2019-06-10T17:44:36.887Z] 17:44:36 INFO - PID 3017 | [Parent 3017, Main Thread] WARNING: nsIEditActionListener installed, this editor becomes slower: 'mActionListeners.Length() != 1', file /builds/worker/workspace/build/src/editor/libeditor/EditorBase.cpp, line 2136
[task 2019-06-10T17:44:36.964Z] 17:44:36 INFO - PID 3017 | ++DOCSHELL 0x7f19becca000 == 1 [pid = 3210] [id = {f5ac1c10-c6c1-48a9-aaa1-f7603f5aa95a}]
[task 2019-06-10T17:44:37.041Z] 17:44:37 INFO - PID 3017 | ++DOMWINDOW == 1 (0x7f19c01f4d40) [pid = 3210] [serial = 1] [outer = (nil)]
[task 2019-06-10T17:44:37.045Z] 17:44:37 INFO - PID 3017 | [Child 3210, Main Thread] WARNING: No active window: file /builds/worker/workspace/build/src/js/xpconnect/src/XPCJSContext.cpp, line 662
[task 2019-06-10T17:44:37.073Z] 17:44:37 INFO - PID 3017 | ++DOMWINDOW == 2 (0x7f19befab000) [pid = 3210] [serial = 2] [outer = 0x7f19c01f4d40]
[task 2019-06-10T17:44:37.190Z] 17:44:37 INFO - PID 3017 | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpZIx365.mozrunner/runtests_leaks_829_tab_pid3247.log
[task 2019-06-10T17:44:37.340Z] 17:44:37 INFO - PID 3017 | Couldn't convert chrome URL: chrome://branding/locale/brand.properties
[task 2019-06-10T17:44:37.340Z] 17:44:37 INFO - PID 3017 | [Child 3247, Main Thread] WARNING: Could not get the program name for a cubeb stream.: 'NS_SUCCEEDED(rv)', file /builds/worker/workspace/build/src/dom/media/CubebUtils.cpp, line 388
[task 2019-06-10T17:44:37.381Z] 17:44:37 INFO - PID 3017 | ++DOMWINDOW == 3 (0x7f19c0168400) [pid = 3210] [serial = 3] [outer = 0x7f19c01f4d40]
[task 2019-06-10T17:44:37.590Z] 17:44:37 INFO - PID 3017 | ++DOMWINDOW == 4 (0x7f19be8e0c00) [pid = 3210] [serial = 4] [outer = 0x7f19c01f4d40]
[task 2019-06-10T17:44:38.458Z] 17:44:38 INFO -
[task 2019-06-10T17:44:38.458Z] 17:44:38 INFO - TEST-UNEXPECTED-FAIL | /webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html | MediaStreamAudioSourceNode captures the right track. - assert_true: Other track seem to be routed to the AudioContext? expected true got false
[task 2019-06-10T17:44:38.458Z] 17:44:38 INFO - analyse@http://web-platform.test:8000/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html:97:11
[task 2019-06-10T17:44:38.458Z] 17:44:38 INFO - Test.prototype.step_timeout/<@http://web-platform.test:8000/resources/testharness.js:1652:22
[task 2019-06-10T17:44:38.458Z] 17:44:38 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1594:25
[task 2019-06-10T17:44:38.459Z] 17:44:38 INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1618:35
[task 2019-06-10T17:44:38.459Z] 17:44:38 INFO - setTimeout handlerTest.prototype.step_timeout@http://web-platform.test:8000/resources/testharness.js:1651:16
[task 2019-06-10T17:44:38.459Z] 17:44:38 INFO - analyse@http://web-platform.test:8000/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html:129:11
[task 2019-06-10T17:44:38.459Z] 17:44:38 INFO - Test.prototype.step_timeout/<@http://web-platform.test:8000/resources/testharness.js:1652:22
[task 2019-06-10T17:44:38.460Z] 17:44:38 INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1594:25
[task 2019-06-10T17:44:38.460Z] 17:44:38 INFO - Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1618:35
[task 2019-06-10T17:44:38.460Z] 17:44:38 INFO - setTimeout handler
Test.prototype.step_timeout@http://web-platform.test:8000/resources/testharness.js:1651:16
[task 2019-06-10T17:44:38.460Z] 17:44:38 INFO - @http://web-platform.test:8000/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html:131:9
[task 2019-06-10T17:44:38.461Z] 17:44:38 INFO - TEST-OK | /webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing.html | took 1673ms

Flags: needinfo?(padenot)
Upstream PR was closed without merging

Comment 9

4 days ago
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fad5e3bf0695
Start testing MediaStreamAudioSourceNode in WPT. r=karlt,pehrsons
https://hg.mozilla.org/integration/autoland/rev/992d3dd0cee0
Implement the correct behaviour for MediaStreamAudioSource.  r=karlt,pehrsons
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR https://github.com/web-platform-tests/wpt/pull/17255
* Taskcluster (pull_request) (https://tools.taskcluster.net/task-group-inspector/#/Cg6CKL36SkaCNAM-ZtNx2g)
Upstream PR was closed without merging
You need to log in before you can comment on or make changes to this bug.