зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1274221 - Test that multiple tracks of the same source all end when in the same stream. r=jib
MozReview-Commit-ID: 64T6I4RDrKH --HG-- extra : rebase_source : 0b19990a9e4a7d2748f2757a067a1c2e7ce4b703 extra : intermediate-source : 30c253e762c6aab5eea21b94c2efa8d033572931 extra : source : b9a09fe46c5e1adc8659070a8f4f60d9e09b7311
This commit is contained in:
Родитель
802a3055ab
Коммит
8fe09d4c19
|
@ -27,8 +27,13 @@
|
|||
// navigated away (see bug 1269400 for details).
|
||||
return new Promise((resolve, reject) =>
|
||||
iframe.contentDocument.gUM({audio: true, video: true}, resolve, reject))
|
||||
.then(s => stream = s)
|
||||
.then(() => {
|
||||
.then(s => {
|
||||
// We're cloning a stream containing identical tracks (an original
|
||||
// and its clone) to test that ended works both for originals
|
||||
// clones when they're both owned by the same MediaStream.
|
||||
// (Bug 1274221)
|
||||
stream = new MediaStream([].concat(s.getTracks(), s.getTracks())
|
||||
.map(t => t.clone())).clone();
|
||||
var allTracksEnded = Promise.all(stream.getTracks().map(t => {
|
||||
info("Set up ended handler for track " + t.id);
|
||||
return haveEvent(t, "ended", wait(5000))
|
||||
|
|
Загрузка…
Ссылка в новой задаче