зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1877118 [wpt PR 44262] - Move tests using legacy MediaStreamTrackGenerator to a legacy folder, a=testonly
Automatic update from web-platform-tests Move tests using legacy MediaStreamTrackGenerator to a legacy folder (#44262) -- wpt-commits: 71ddae673710545457abeeb8135b5395dfc5e460 wpt-pr: 44262
This commit is contained in:
Родитель
c90e86701a
Коммит
ed1aaa3f08
|
@ -0,0 +1,17 @@
|
|||
onmessage = async msg => {
|
||||
const reader = msg.data.readable.getReader();
|
||||
let readResult = await reader.read();
|
||||
postMessage(readResult.value);
|
||||
readResult.value.close();
|
||||
// Continue reading until the stream is done due to a track.stop()
|
||||
while (true) {
|
||||
readResult = await reader.read();
|
||||
if (readResult.done) {
|
||||
break;
|
||||
} else {
|
||||
readResult.value.close();
|
||||
}
|
||||
}
|
||||
await reader.closed;
|
||||
postMessage('closed');
|
||||
}
|
Загрузка…
Ссылка в новой задаче