Package com.twilio.voice
Interface PreflightTest.Listener
- Enclosing class:
- PreflightTest
public static interface PreflightTest.Listener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onPreflightCompleted
(PreflightTest preflightTest, org.json.JSONObject report) Raised when the preflight test is completed successfullyvoid
onPreflightConnected
(PreflightTest preflightTest) Raised when the preflight test successfully connects to Twilio backend.void
onPreflightFailed
(PreflightTest preflightTest, CallException error) Raised when the preflight test failsvoid
onPreflightSample
(PreflightTest preflightTest, org.json.JSONObject sample) Raised when the test Call receives a WebRTC stats report and a stats sample is generated.void
onPreflightWarning
(PreflightTest preflightTest, Set<Call.CallQualityWarning> currentWarnings, Set<Call.CallQualityWarning> previousWarnings) Raised when call quality warning or Audio level warning is received or cleared during the test.
-
Method Details
-
onPreflightConnected
Raised when the preflight test successfully connects to Twilio backend. Preflight test state is `kConnected` at this point- Parameters:
preflightTest
- an object representing the test
-
onPreflightCompleted
void onPreflightCompleted(@NonNull PreflightTest preflightTest, @NonNull org.json.JSONObject report) Raised when the preflight test is completed successfully- Parameters:
preflightTest
- an object representing the testreport
- preflight report as a JSONObject defined by the PreflightReport Schema.
This schema refers to different sub-schemas for the various metrics and events it reports. The schemas for these individual metrics and events can be found at:Aggregate Stats - Schema
Network Stats - Schema
Time Measurement Stats - Schema
Network Timing Stats - Schema
Warning Stats - Schema
Warning Cleared Stats - Schema
Ice Candidate Stats - Schema
Selected Ice Candidate Pair Stats - Schema
Media Sample Stats - Schema
-
onPreflightFailed
Raised when the preflight test fails- Parameters:
preflightTest
- an object representing the testerror
- CallException that describes why the test failed.
-
onPreflightWarning
void onPreflightWarning(@NonNull PreflightTest preflightTest, @NonNull Set<Call.CallQualityWarning> currentWarnings, @NonNull Set<Call.CallQualityWarning> previousWarnings) Raised when call quality warning or Audio level warning is received or cleared during the test. From the current warnings and previous warnings set, it can be determined which warning was raised or cleared.- Parameters:
preflightTest
- an object representing the testcurrentWarnings
- set of current warnings.previousWarnings
- set of previous warnings.
-
onPreflightSample
Raised when the test Call receives a WebRTC stats report and a stats sample is generated. The callback is raised every second.- Parameters:
preflightTest
- an object representing the testsample
- The latest Stats Sample as a JSONObject defined by the StatsSample Schema.
-