From d3b6ee3e69e7b82556f4fd0820706ab8c9f5d2b2 Mon Sep 17 00:00:00 2001 From: mattie ruth backman Date: Tue, 2 Jul 2024 14:15:47 -0400 Subject: [PATCH] fix(dj): update connectionQuality test to use and point to the correct preferred alternative (cherry picked from commit 01aacb96dc52926e87c04e51cd66e3e92df038b3) --- src/module.js | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/module.js b/src/module.js index a29a18b1..35c8db99 100644 --- a/src/module.js +++ b/src/module.js @@ -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, @@ -3649,7 +3656,7 @@ testPeerToPeerCallQuality() instead`); async testPeerToPeerCallQuality(args) { methodNotSupportedDuringTestCall( this._testCallInProgress, - `testConnectionQuality()` + `testPeerToPeerCallQuality()` ); if (this.needsLoad()) { try { @@ -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() {