onWTNFirstRemoteVideoFrameDecoded$withFrameInfo method
FutureOr<void>
onWTNFirstRemoteVideoFrameDecoded$withFrameInfo(
- dynamic streamId,
- dynamic frameInfo
override
@detail callback
@valid since 3.60. Since version 3.60, this callback replaces onWTNFirstRemoteVideoFrameDecoded:withFrameInfo:. 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:subscribe:{@link #ByteRTCWTNStream#subscribeWTNVideoStream:subscribe} for details about subscribing to a WTN stream.
@param streamId ID of the WTN stream
@param frameInfo Information of the video stream. Refer to ByteRTCVideoFrameInfo{@link #ByteRTCVideoFrameInfo} for more details.
@order 4
Implementation
FutureOr<void> onWTNFirstRemoteVideoFrameDecoded$withFrameInfo(
dynamic streamId, dynamic frameInfo) async {
if ($instance == null || $instance is! IWTNStreamEventHandler) {
return;
}
return ($instance as IWTNStreamEventHandler)
.onWTNFirstRemoteVideoFrameDecoded
?.call(
streamId.toString(),
packObject(
frameInfo,
() => VideoFrameInfo.fromMap(VideoFrameInfo.deepPackedMapValues(
VideoFrameInfo.mapMemberToConstructorParams(frameInfo)))));
}