onWTNFirstRemoteVideoFrameDecoded method

FutureOr<void> onWTNFirstRemoteVideoFrameDecoded(
  1. dynamic streamId,
  2. dynamic info
)
override

@detail callback @valid since 3.60. Since version 3.60, this callback replaces onFirstPublicStreamVideoFrameDecoded. If you have upgraded to version 3.60 or later and are still using this method, please migrate to this callback. @author hanchenchen @brief Callback of successfully decoding of the first video frame of the WTN stream
Refer to subscribeWTNVideoStream{@link #IWTNStream#subscribeWTNVideoStream} for details about subscribing to a WTN video stream. @param streamId ID of the WTN stream @param info Information of the video stream. Refer to VideoFrameInfo{@link #VideoFrameInfo} for more details. @order 4

Implementation

FutureOr<void> onWTNFirstRemoteVideoFrameDecoded(
    dynamic streamId, dynamic info) async {
  if ($instance == null || $instance is! IWTNStreamEventHandler) {
    return;
  }
  return ($instance as IWTNStreamEventHandler)
      .onWTNFirstRemoteVideoFrameDecoded
      ?.call(
          streamId.toString(),
          packObject(
              info,
              () => VideoFrameInfo.fromMap(VideoFrameInfo.deepPackedMapValues(
                  VideoFrameInfo.mapMemberToConstructorParams(info)))));
}