Skip to content

Commit

Permalink
fix(dj): update connectionQuality test to use and point to the correc…
Browse files Browse the repository at this point in the history
…t preferred alternative

(cherry picked from commit 01aacb96dc52926e87c04e51cd66e3e92df038b3)
  • Loading branch information
mattieruth authored and filipi87 committed Jul 2, 2024
1 parent 863e91b commit d3b6ee3
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -3629,9 +3629,16 @@ export default class DailyIframe extends EventEmitter {
}

async testConnectionQuality(args) {
console.warn(`testConnectionQuality() is deprecated: use \
let stats;
if (isReactNative()) {
console.warn(`testConnectionQuality() is deprecated: use \
testPeerToPeerCallQuality() instead`);
const stats = await this.testPeerToPeerCallQuality(args);
stats = await this.testPeerToPeerCallQuality(args);
} else {
console.warn(`testConnectionQuality() is deprecated: use \
testCallQuality() instead`);
stats = await this.testCallQuality();
}
// return backwards compatible type
let bcStats = {
result: stats.result,
Expand All @@ -3649,7 +3656,7 @@ testPeerToPeerCallQuality() instead`);
async testPeerToPeerCallQuality(args) {
methodNotSupportedDuringTestCall(
this._testCallInProgress,
`testConnectionQuality()`
`testPeerToPeerCallQuality()`
);
if (this.needsLoad()) {
try {
Expand Down Expand Up @@ -3686,9 +3693,15 @@ testPeerToPeerCallQuality() instead`);
}

stopTestConnectionQuality() {
console.warn(`stopTestConnectionQuality() is deprecated: use \
stopTestPeerToPeerCallQuality() instead`);
this.stopTestPeerToPeerCallQuality();
if (isReactNative()) {
console.warn(`stopTestConnectionQuality() is deprecated: use \
testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead`);
this.stopTestPeerToPeerCallQuality();
} else {
console.warn(`stopTestConnectionQuality() is deprecated: use \
testCallQuality() and stopTestCallQuality() instead`);
this.stopTestCallQuality();
}
}

stopTestPeerToPeerCallQuality() {
Expand Down

0 comments on commit d3b6ee3

Please sign in to comment.