語言

MediaSession.Callback.OnSetPlaybackSpeed(Single) 方法

定義

覆蓋以處理播放速度的變化。

[Android.Runtime.Register("onSetPlaybackSpeed", "(F)V", "GetOnSetPlaybackSpeed_FHandler", ApiSince=29)]
public virtual void OnSetPlaybackSpeed(float speed);
[<Android.Runtime.Register("onSetPlaybackSpeed", "(F)V", "GetOnSetPlaybackSpeed_FHandler", ApiSince=29)>]
abstract member OnSetPlaybackSpeed : single -> unit
override this.OnSetPlaybackSpeed : single -> unit

參數

speed
Single

播放速度

屬性

備註

覆蓋以處理播放速度的變化。 要更新新的播放速度,請使用 PlaybackState,並用 PlaybackState.Builder#setState(int, long, float)設定 #setPlaybackState(PlaybackState) 。

1.0f值為預設播放值,負值表示反向播放。 這個 speed Will 不會等於零。

Java 文件 android.media.session.MediaSession.Callback.onSetPlaybackSpeed(float)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於