registerLocalEncodedVideoFrameObserver method

FutureOr<int> registerLocalEncodedVideoFrameObserver(
  1. id<ByteRTCLocalEncodedVideoFrameObserver> frameObserver
)

@detail api @hiddensdk(audiosdk) @author liuyangyang @brief Register a local video frame observer.
This method applys to both internal capturing and custom capturing.
After calling this API, SDK triggers onLocalEncodedVideoFrame:Frame:{@link #ByteRTCLocalEncodedVideoFrameObserver#onLocalEncodedVideoFrame:Frame} whenever a video frame is captured. @param frameObserver Local video frame observer. See ByteRTCLocalEncodedVideoFrameObserver{@link #ByteRTCLocalEncodedVideoFrameObserver}. You can cancel the registration by setting it to nullptr. @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note You can call this API before or after entering the RTC room. Calling this API before entering the room ensures that video frames are monitored and callbacks are triggered as early as possible.

Implementation

FutureOr<int> registerLocalEncodedVideoFrameObserver(
    id<ByteRTCLocalEncodedVideoFrameObserver> frameObserver) async {
  return await nativeCall(
      'registerLocalEncodedVideoFrameObserver:', [frameObserver]);
}