getVideoAnnotation method

  1. @override
Future<RtcAnnotation?> getVideoAnnotation(
  1. String userId,
  2. int streamId
)
override

Get video annotation object.

Parameter userId User ID

Parameter streamId Stream ID

Returns

  • non-null: a pointer to the video annotation object
  • others: Failure

获取视频标注对象

Parameter userId 用户ID

Parameter streamId 视频流ID

Returns

  • 非空指针: 指向视频标注对象的指针。
  • 空指针: 失败

Implementation

@override
Future<RtcAnnotation?> getVideoAnnotation(String userId, int streamId) async {
  var annotationId = await _invokeMethod(
          'getVideoAnnotation', {'userId': userId, 'streamId': streamId})
      as String;
  if (annotationId.isNotEmpty) {
    annotations[annotationId] ??= RtcAnnotation(annotationId);
    return annotations[annotationId];
  }
  return null;
}