c60c378381c8c96577c9a80113b490675eeff83e
[gecko.git] / test_peerConnection_twoVideoTracksInOneStream.html
blobc60c378381c8c96577c9a80113b490675eeff83e
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script type="application/javascript" src="pc.js"></script>
5 </head>
6 <body>
7 <pre id="test">
8 <script type="application/javascript">
9 createHTML({
10 bug: "1145407",
11 title: "Multistream: Two video tracks in offerer stream"
12 });
14 var test;
15 runNetworkTest(function (options) {
16 test = new PeerConnectionTest(options);
17 test.chain.insertAfter("PC_REMOTE_GET_OFFER", [
18 function PC_REMOTE_OVERRIDE_STREAM_IDS_IN_OFFER(test) {
19 test._local_offer.sdp = test._local_offer.sdp.replace(
20 /a=msid:[^\s]*/g,
21 "a=msid:foo");
23 function PC_REMOTE_OVERRIDE_EXPECTED_STREAM_IDS(test) {
24 Object.keys(
25 test.pcRemote.expectedRemoteTrackInfoById).forEach(trackId => {
26 test.pcRemote.expectedRemoteTrackInfoById[trackId].streamId = "foo";
27 });
29 ]);
30 test.chain.insertAfter("PC_LOCAL_GET_ANSWER", [
31 function PC_LOCAL_OVERRIDE_STREAM_IDS_IN_ANSWER(test) {
32 test._remote_answer.sdp = test._remote_answer.sdp.replace(
33 /a=msid:[^\s]*/g,
34 "a=msid:foo");
36 function PC_LOCAL_OVERRIDE_EXPECTED_STREAM_IDS(test) {
37 Object.keys(
38 test.pcLocal.expectedRemoteTrackInfoById).forEach(trackId => {
39 test.pcLocal.expectedRemoteTrackInfoById[trackId].streamId = "foo";
40 });
42 ]);
43 test.setMediaConstraints([{video: true}, {video: true}],
44 [{video: true}, {video: true}]);
45 test.run();
46 });
47 </script>
48 </pre>
49 </body>
50 </html>