getLocalPeer method

Future<HMSLocalPeer?> getLocalPeer()

Returns an instance of the local peer if one existed. A local peer only exists during a preview and an active call. Returns null if no room is joined.

Implementation

Future<HMSLocalPeer?> getLocalPeer() async {
  Map? hmsLocalPeerMap =
      await PlatformService.invokeMethod(PlatformMethod.getLocalPeer);
  if (hmsLocalPeerMap == null) return null;
  return HMSLocalPeer.fromMap(hmsLocalPeerMap);
}