ByteRTCKTVPlayerDelegate class
- Inheritance
-
- Object
- NativeClass
- NativeObserverClass
- ByteRTCKTVPlayerDelegate
Properties
-
$instance
↔ dynamic
-
getter/setter pairinherited
-
$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
-
emit(String name, List args)
→ dynamic
-
inherited
-
ktvPlayer$onPlayProgress$progress(ByteRTCKTVPlayer ktvPlayer, NSString musicId, int64_t progress)
→ FutureOr<void>
-
@detail callback
@author lihuan.wuti2ha
@brief 音乐播放进度回调。
@param ktvPlayer 当前 ktvPlayer 对象,参看 ByteRTCKTVPlayer{@link #ByteRTCKTVPlayer}。
@param musicId 音乐 ID。
@param progress 音乐播放进度,单位为毫秒。
-
ktvPlayer$onPlayStateChanged$state$error(ByteRTCKTVPlayer ktvPlayer, NSString musicId, ByteRTCPlayState state, ByteRTCKTVPlayerErrorCode error)
→ FutureOr<void>
-
@detail callback
@author lihuan.wuti2ha
@brief 音乐播放状态改变回调。
@param ktvPlayer 当前 ktvPlayer 对象,参看 ByteRTCKTVPlayer{@link #ByteRTCKTVPlayer}。
@param musicId 音乐 ID。
@param state 音乐播放状态,参看 ByteRTCPlayState{@link #ByteRTCPlayState}。
@param error 错误码,参看 ByteRTCKTVPlayerErrorCode{@link #ByteRTCKTVPlayerErrorCode}。
@note
此回调被触发的时机汇总如下:
- 调用 playMusic:audioTrackType:audioPlayType:{@link #ByteRTCKTVPlayer#playMusic:audioTrackType:audioPlayType} 成功后,会触发 playState 值为 ByteRTCPlayStatePlaying 的回调;否则会触发 playState 值为 ByteRTCPlayStateFailed 的回调。
- 使用相同的音乐 ID 重复调用 playMusic:audioTrackType:audioPlayType:{@link #ByteRTCKTVPlayer#playMusic:audioTrackType:audioPlayType} 后,后一次播放会覆盖前一次,且会触发 playState 值为 ByteRTCPlayStatePlaying 的回调,表示后一次音乐播放已开始。
- 调用 pauseMusic:{@link #ByteRTCKTVPlayer#pauseMusic} 方法暂停播放成功后,会触发 playState 值为 ByteRTCPlayStatePaused 的回调;否则触发 playState 值为 ByteRTCPlayStateFailed 的回调。
- 调用 resumeMusic:{@link #ByteRTCKTVPlayer#resumeMusic} 方法恢复播放成功后,会触发 playState 值为 ByteRTCPlayStatePlaying 的回调;否则触发 playState 值为 ByteRTCPlayStateFailed 的回调。
- 调用 stopMusic:{@link #ByteRTCKTVPlayer#stopMusic} 方法停止播放成功后,会触发 playState 值为 ByteRTCPlayStateStoped 的回调;否则触发 playState 值为 ByteRTCPlayStateFailed 的回调。
- 音乐播放结束会触发 playState 值为 ByteRTCPlayStateFinished 的回调。
-
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
-
registerEvent(String name, dynamic method)
→ void
-
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
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateInstance(dynamic instance)
→ void
-
inherited
-
updateResource(NativeResource resource)
→ void
-
inherited