accept method

Future<int> accept()

ZH

接电话

如果呼入类型为语音通话,即接受语音通话;如果呼入类型为视频通话,即接受视频通话并打开默认(前置)摄像头。观察者不开启摄像头。

EN

Accept call

If incoming type is audio, accept as audio; if video, accept as video and open the default (front) camera. Observer does not enable camera

Implementation

Future<int> accept() async {
  int code = await _channel.invokeMethod('accept') ?? -1;
  await getCurrentCallSession();
  return code;
}