背景音频 - seek

WMPFMusicApi.seek

需 WMPF >= 2.2.0 支持,使用前建议阅读注意事项

设置小程序背景音频播放进度。如果当前没有正在播放背景音频的小程序,该函数将没有作用。

调用参数

参数 类型 说明 最低版本
position int 播放进度, 范围 [0, duration)

duration 可以通过 WMPFMusicApi.getPlayingMetadta() 获取。

返回参数

示例代码

val musicApi = WMPF.getInstance().getMusicApi()
musicApi.seek(position)
posted on 2025-02-22 13:32  AtlasLapetos  阅读(5)  评论(0)    收藏  举报