File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/data-sdk/src/devices Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 4
4
RtcClient ,
5
5
IRtcPeer ,
6
6
} from "@formant/realtime-sdk" ;
7
+ import { IPingInfo } from "@formant/realtime-sdk/dist/rtc-client/models/IPingInfo" ;
7
8
import { DataChannel } from "../DataChannel" ;
8
9
import { EventEmitter } from "eventemitter3" ;
9
10
import { Manipulator } from "../Manipulator" ;
@@ -73,6 +74,14 @@ export abstract class BaseDevice
73
74
}
74
75
}
75
76
77
+ getRealtimePingInfo ( ) : IPingInfo | undefined {
78
+ if ( this . rtcClient && this . remoteDevicePeerId ) {
79
+ return this . rtcClient . getPingInfo ( this . remoteDevicePeerId ) ;
80
+ } else {
81
+ throw new Error ( `Realtime connection hasn't been started` ) ;
82
+ }
83
+ }
84
+
76
85
getRealtimePing ( ) : number | undefined {
77
86
if ( this . rtcClient && this . remoteDevicePeerId ) {
78
87
return this . rtcClient . getPing ( this . remoteDevicePeerId ) ;
You can’t perform that action at this time.
0 commit comments