Skip to content

Commit dfb329b

Browse files
committed
test: update audio codec test
1 parent 3116e19 commit dfb329b

File tree

1 file changed

+9
-2
lines changed
  • src/content/peerconnection/audio/js

1 file changed

+9
-2
lines changed

src/content/peerconnection/audio/js/test.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,15 @@ test('Audio-only sample codec preference', function(t) {
5353
.then(function(stats) {
5454
// Find the sending audio track.
5555
stats.forEach(function(report) {
56-
if (report.type === 'ssrc' && report.googTrackId === trackId) {
57-
t.ok(codecName === report.googCodecName, 'preferring ' + codecName);
56+
if (report.type === 'outbound-rtp') {
57+
var trackStats = stats.get(report.trackId);
58+
if (trackStats && trackStats.trackIdentifier === trackId) {
59+
var codecStats = stats.get(report.codecId);
60+
if (codecStats) {
61+
t.ok('audio/' + codecName === codecStats.mimeType,
62+
'preferring ' + codecName);
63+
}
64+
}
5865
}
5966
});
6067
return driver.findElement(webdriver.By.id('hangupButton')).click();

0 commit comments

Comments
 (0)