mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
3a680bf820
--HG-- extra : rebase_source : 7434ef35ea6294966220f20431941e0790c4221c
49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<script type="application/javascript" src="pc.js"></script>
|
|
</head>
|
|
<body>
|
|
<video id="v1" src="../../test/vp9cake.webm" height="120" width="160" autoplay muted></video>
|
|
<pre id="test">
|
|
<script type="application/javascript;version=1.8">
|
|
createHTML({
|
|
bug: "1081409",
|
|
title: "Captured video-only over peer connection",
|
|
visible: true
|
|
});
|
|
|
|
var metadataLoaded = new Promise(resolve => {
|
|
if (v1.readyState < v1.HAVE_METADATA) {
|
|
v1.onloadedmetadata = resolve;
|
|
} else {
|
|
resolve();
|
|
}
|
|
});
|
|
|
|
runNetworkTest(function() {
|
|
var test = new PeerConnectionTest();
|
|
test.setOfferOptions({ offerToReceiveVideo: false,
|
|
offerToReceiveAudio: false });
|
|
test.chain.insertAfter("PC_LOCAL_GUM", [
|
|
function PC_LOCAL_CAPTUREVIDEO(test) {
|
|
return metadataLoaded
|
|
.then(() => {
|
|
var stream = v1.mozCaptureStreamUntilEnded();
|
|
is(stream.getTracks().length, 2, "Captured stream has 2 tracks");
|
|
stream.getTracks().forEach(tr => {
|
|
test.pcLocal._pc.addTrack(tr, stream);
|
|
test.pcLocal.expectedLocalTrackTypesById[tr.id] = tr.kind;
|
|
});
|
|
test.pcLocal.constraints = [{ video: true, audio:true }]; // fool tests
|
|
});
|
|
}
|
|
]);
|
|
test.chain.removeAfter("PC_REMOTE_CHECK_MEDIA_FLOW_PRESENT");
|
|
test.run();
|
|
});
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|