startSingScoring method

FutureOr<int> startSingScoring(
  1. int position,
  2. int scoringInfoInterval
)

@detail api @author wangjunzheng @brief Start karaoke scoring. @param position You can get the playback position where you start karaoke scoring. Unit: ms. @param scoringInfoInterval Time interval between two real-time callbacks. Unit: ms; Default interval: 50 ms. Minimum interval: 20 ms. @return - 0:Success. - -1:Interface call failed. - -2: Karaoke scoring module not integrated. - >0: Other error. For details, seeError code. @note - You can call this API after calling initSingScoring:singScoringToken:delegate:{@link #ByteRTCSingScoringManager#initSingScoring:singScoringToken:delegate} to initialize karaoke scoring. - After this interface is called, you will receive the scoring result onCurrentScoringInfo:{@link #ByteRTCSingScoringDelegate#onCurrentScoringInfo} at set interval. - If you call the startAudioMixing:filePath:config: to play an audio file, call this interface after you receive rtcEngine:onAudioMixingStateChanged:state:error:(ByteRTCAudioMixingStatePlaying).

Implementation

FutureOr<int> startSingScoring(int position, int scoringInfoInterval) async {
  return await nativeCall('startSingScoring:scoringInfoInterval:',
      [position, scoringInfoInterval]);
}