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"

uploadSpeed

Double

O

Upload rate (ms)

downloadSpeed

Double

O

Download rate (ms)

jitter

Double

O

Network jitter

packetLoss

Double

O

Packet loss rate 0~100

latencyInMs

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,
        }
}