背景音频 - seek
WMPFMusicApi.seek
需 WMPF >= 2.2.0 支持,使用前建议阅读注意事项
设置小程序背景音频播放进度。如果当前没有正在播放背景音频的小程序,该函数将没有作用。
调用参数
| 参数 | 类型 | 说明 | 最低版本 |
|---|---|---|---|
| position | int | 播放进度, 范围 [0, duration) |
duration 可以通过 WMPFMusicApi.getPlayingMetadta() 获取。
返回参数
无
示例代码
val musicApi = WMPF.getInstance().getMusicApi()
musicApi.seek(position)
浙公网安备 33010602011771号