my.MDXStartSpeedTesting
Start Speed check & Testing Result
Sample Code
copy
my.call('MDXStartSpeedTesting',{
}).then((values)=>{
my.alert({
content:JSON.stringify(values)
});
}).catch((value)=>{
my.alert({
title:'faile',
content:JSON.stringify(value)
});
})
Parameters
No Requirement
Success Callback Function
Name | Type | Required | Description |
success | bool | true | Whether the JSAPI call is successful |
code | number | true | 0: success Other scene error type code 1 : invalidSettings 2 : invalidServers 3 : inProgress 4 : failed 5 : notSaved 6: canceled 7 : locationUndefined 8 : appISPMismatch |
result | Object | true | refer to "Demo Response" |
| Double | O | Upload rate (ms) |
| Double | O | Download rate (ms) |
| Double | O | Network jitter |
| Double | O | Packet loss rate 0~100 |
| Int | O | Delay time (milliseconds) |
Demo Response
copy
{
success: true,
code: 0,
result:{
uploadSpeed: 36.393,
downloadSpeed: 36.393,
jitter: 36.393,
packetLoss: 36.393,
latencyInMs: 2933,
}
}