зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1509173 [wpt PR 14170] - webrtc-wpt: use addTrack(track, stream) to increase firefox compat, a=testonly
Automatic update from web-platform-tests webrtc-wpt: use addTrack(track, stream) to increase firefox compat Firefox does not support addTrack(track). Add a track whereever it makes sense. The addTrack tests itself might rightfully use this. The following grep shows most affected places: git grep addTrack *.html | grep -v , | grep -v "\.\.\." Bug: None Change-Id: Ib225e6d51184c3ccc446ccf93447e2ac7be080c3 Reviewed-on: https://chromium-review.googlesource.com/c/1346394 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#611262} -- wpt-commits: 641ad0bf0df17b0f422642afa6019a594ef8d0e8 wpt-pr: 14170
This commit is contained in:
Родитель
436653f6a1
Коммит
7a1bbe99fa
|
@ -122,7 +122,7 @@
|
|||
const stream = await navigator.mediaDevices.getUserMedia({audio: true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
const [track] = stream.getTracks();
|
||||
callee.addTrack(track);
|
||||
callee.addTrack(track, stream);
|
||||
const answer = await callee.createAnswer();
|
||||
await callee.setLocalDescription(answer);
|
||||
await caller.setRemoteDescription(answer);
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
const offer = await caller.createOffer();
|
||||
await caller.setLocalDescription(offer);
|
||||
await callee.setRemoteDescription(offer);
|
||||
callee.addTrack(track);
|
||||
callee.addTrack(track, stream);
|
||||
const answer = await callee.createAnswer();
|
||||
await callee.setLocalDescription(answer);
|
||||
await caller.setRemoteDescription(answer);
|
||||
|
@ -244,7 +244,7 @@
|
|||
const offer = await caller.createOffer();
|
||||
await caller.setLocalDescription(offer);
|
||||
await callee.setRemoteDescription(offer);
|
||||
callee.addTrack(track);
|
||||
callee.addTrack(track, stream);
|
||||
const answer = await callee.createAnswer();
|
||||
await callee.setLocalDescription(answer);
|
||||
await caller.setRemoteDescription(answer);
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
const localStream =
|
||||
await getNoiseStream({audio: true});
|
||||
t.add_cleanup(() => localStream.getTracks().forEach(track => track.stop()));
|
||||
caller.addTrack(localStream.getTracks()[0]);
|
||||
caller.addTrack(localStream.getTracks()[0], localStream);
|
||||
const ontrackPromise = addEventListenerPromise(t, callee, 'track', e => {
|
||||
assert_array_equals(callee.getReceivers(), [e.receiver],
|
||||
'getReceivers() == [e.receiver].');
|
||||
|
@ -245,7 +245,7 @@
|
|||
const localStream =
|
||||
await getNoiseStream({audio: true});
|
||||
t.add_cleanup(() => localStream.getTracks().forEach(track => track.stop()));
|
||||
const sender = caller.addTrack(localStream.getTracks()[0]);
|
||||
const sender = caller.addTrack(localStream.getTracks()[0], localStream);
|
||||
const ontrackPromise = addEventListenerPromise(t, callee, 'track');
|
||||
await exchangeOfferAnswer(caller, callee);
|
||||
await ontrackPromise;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
return getUserMediaTracksAndStreams(1)
|
||||
.then(t.step_func(([tracks, streams]) => {
|
||||
track = tracks[0];
|
||||
pc.addTrack(track);
|
||||
pc.addTrack(track, streams[0]);
|
||||
return pc.getStats();
|
||||
}))
|
||||
.then(t.step_func(report => {
|
||||
|
@ -73,7 +73,7 @@
|
|||
return getUserMediaTracksAndStreams(1)
|
||||
.then(t.step_func(([tracks, streams]) => {
|
||||
track = tracks[0];
|
||||
pc.addTrack(track);
|
||||
pc.addTrack(track, streams[0]);
|
||||
return pc.createOffer();
|
||||
}))
|
||||
.then(t.step_func(offer => {
|
||||
|
@ -204,7 +204,7 @@
|
|||
return getUserMediaTracksAndStreams(1)
|
||||
.then(t.step_func(([tracks, streams]) => {
|
||||
sendingTrack = tracks[0];
|
||||
caller.addTrack(sendingTrack);
|
||||
caller.addTrack(sendingTrack, streams[0]);
|
||||
return doSignalingHandshake(caller, callee);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -237,7 +237,7 @@
|
|||
};
|
||||
return getUserMediaTracksAndStreams(1)
|
||||
.then(t.step_func(([tracks, streams]) => {
|
||||
caller.addTrack(tracks[0]);
|
||||
caller.addTrack(tracks[0], streams[0]);
|
||||
return doSignalingHandshake(caller, callee);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -271,7 +271,7 @@
|
|||
.then(t.step_func(([tracks, streams]) => {
|
||||
sendingTrack1 = tracks[0];
|
||||
sendingTrack2 = tracks[1];
|
||||
sender = caller.addTrack(sendingTrack1);
|
||||
sender = caller.addTrack(sendingTrack1, streams[0]);
|
||||
return sender.replaceTrack(sendingTrack2);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -300,7 +300,7 @@
|
|||
.then(t.step_func(([tracks, streams]) => {
|
||||
sendingTrack1 = tracks[0];
|
||||
sendingTrack2 = tracks[1];
|
||||
sender = caller.addTrack(sendingTrack1);
|
||||
sender = caller.addTrack(sendingTrack1, streams[0]);
|
||||
return exchangeOffer(caller, callee);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -337,7 +337,7 @@
|
|||
.then(t.step_func(([tracks, streams]) => {
|
||||
sendingTrack1 = tracks[0];
|
||||
sendingTrack2 = tracks[1];
|
||||
sender = caller.addTrack(sendingTrack1);
|
||||
sender = caller.addTrack(sendingTrack1, streams[0]);
|
||||
return doSignalingHandshake(caller, callee);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -373,7 +373,7 @@
|
|||
.then(t.step_func(([tracks, streams]) => {
|
||||
sendingTrack1 = tracks[0];
|
||||
sendingTrack2 = tracks[1];
|
||||
sender = caller.addTrack(sendingTrack1);
|
||||
sender = caller.addTrack(sendingTrack1, streams[0]);
|
||||
return doSignalingHandshake(caller, callee);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
|
@ -569,8 +569,8 @@
|
|||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
let [tracks, streams] = await getUserMediaTracksAndStreams(2);
|
||||
let sender1 = pc.addTrack(tracks[0]);
|
||||
let sender2 = pc.addTrack(tracks[1]);
|
||||
let sender1 = pc.addTrack(tracks[0], streams[0]);
|
||||
let sender2 = pc.addTrack(tracks[1], streams[1]);
|
||||
await sender2.replaceTrack(sender1.track);
|
||||
await promise_rejects(t, 'InvalidAccessError', pc.getStats(sender1.track));
|
||||
}, 'RTCPeerConnection.getStats(track) throws InvalidAccessError when there ' +
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
const stream = await getNoiseStream({audio:true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
const [track] = stream.getTracks();
|
||||
callee.addTrack(track);
|
||||
callee.addTrack(track, stream);
|
||||
|
||||
const { receiver } = caller.addTransceiver('audio');
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче