diff options
Diffstat (limited to 'testing/web-platform/tests/webrtc-svc/svc-helper.js')
-rw-r--r-- | testing/web-platform/tests/webrtc-svc/svc-helper.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/web-platform/tests/webrtc-svc/svc-helper.js b/testing/web-platform/tests/webrtc-svc/svc-helper.js index e73ccfa750..6a357f085b 100644 --- a/testing/web-platform/tests/webrtc-svc/svc-helper.js +++ b/testing/web-platform/tests/webrtc-svc/svc-helper.js @@ -36,7 +36,9 @@ function createScalabilityTest(mimeType, scalabilityModes) { const transceiver = pc1.addTransceiver(track1, { sendEncodings: [{ scalabilityMode: scalabilityMode }], }); - transceiver.setCodecPreferences(RTCRtpSender.getCapabilities('video').codecs.filter(c => c.mimeType == mimeType)); + pc2.addEventListener('track', e => { + e.transceiver.setCodecPreferences(RTCRtpReceiver.getCapabilities('video').codecs.filter(c => c.mimeType == mimeType)); + }); const haveTrackEvent = new Promise(r => pc2.ontrack = r); exchangeIceCandidates(pc1, pc2); await exchangeOfferAnswer(pc1, pc2); |