ByteRTCSingScoringManager class

Inheritance
  • Object
  • NativeClass
  • ByteRTCSingScoringManager

Constructors

ByteRTCSingScoringManager([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
inherited
getAverageScore() FutureOr<int>
@detail api @author wangjunzheng @brief Get the average score for the user's current performance. @return - <0:Failed to get the average score. - >=0:The average score. @order 28
getLastSentenceScore() FutureOr<int>
@detail api @author wangjunzheng @brief Get the score for the previous lyric. You can call this API after startSingScoring:scoringInfoInterval:{@link #ByteRTCSingScoringManager#startSingScoring:scoringInfoInterval} is called. @return - <0:Failed to get the score for the previous lyric. - >=0:The score for the previous lyric. @order 26
getStandardPitchInfo(NSString midiFilepath) FutureOr<ByteRTCStandardPitchInfo>
@detail api @author wangjunzheng @brief Get standard pitch. @param midiFilepath Midi file path of the song. @return ByteRTCStandardPitchInfo{@link #ByteRTCStandardPitchInfo} Standard pitch data array. @note - Please make sure the same midi file path is passed in this API and setSingScoringConfig:{@link #ByteRTCSingScoringManager#setSingScoringConfig}. @order 23
getTotalScore() FutureOr<int>
@detail api @author wangjunzheng @brief Get the total score for the user's current performance. You can call this API after startSingScoring:scoringInfoInterval:{@link #ByteRTCSingScoringManager#startSingScoring:scoringInfoInterval} is called. @return - <0:Failed to get the total score. - >=0:The current total score. @order 27
initSingScoring(NSString singScoringAppkey, NSString singScoringToken, id<ByteRTCSingScoringDelegate> delegate) FutureOr<int>
@detail api @author wangjunzheng @brief Initialize karaoke scoring feature. @param singScoringAppkey The key for karaoke scoring, used to authenticate whether the karaoke scoring is enabled. @param singScoringToken The key for karaoke scoring, used to authenticate whether the karaoke scoring is enabled. @param delegate Karaoke scoring event handler,see ByteRTCSingScoringDelegate{@link #ByteRTCSingScoringDelegate}. @return - 0:Success. - -1:Interface call failed. - -2: Karaoke scoring module not integrated. - >0: Other error. For details, seeError code. @order 21
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
setSingScoringConfig(ByteRTCSingScoringConfig config) FutureOr<int>
@detail api @author wangjunzheng @brief Set the configuration of karaoke scoring. @param config The parameters of karaoke scoring. See ByteRTCSingScoringConfig{@link #ByteRTCSingScoringConfig}. @return - 0:Success. - -1:Interface call failed. - -2: Karaoke scoring module not integrated. - >0: Other error. For details, seeError code. @order 22
startSingScoring(int position, int scoringInfoInterval) FutureOr<int>
@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).
stopSingScoring() FutureOr<int>
@detail api @author wangjunzheng @brief Stop karaoke scoring. @return - 0:Success. - <0:Failure. @order 25
toString() String
A string representation of this object.
inherited
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

codegen_$namespace → dynamic
no setter