Namespace: AudioEvent

miot/host/audio~AudioEvent

Audio播放事件名集合

Example

import { AudioEvent } from 'miot/host/audio';
   const subscription = AudioEvent.audioPlayerDidFinishPlaying.addListener(
      (event)=>{
         ...
      }
    )
   ...
   subscription.remove()
   ...

Events

audioPlayerDidFinishPlaying

播放完毕事件

Parameters:
Name Type Description
event json

{audioPlayerUid,isSuccess}音频播放的Uid,是否播放成功

Since:
  • 10020

audioPlayerDidStartPlaying

播放开始事件

Parameters:
Name Type Description
event json

{audioPlayerUid,isSuccess}音频播放的Uid,是否成功开始播放

Since:
  • 10020

updateAudioPlayerTime

播放进度事件

Parameters:
Name Type Description
params json

{audioPlayerUid,currentTime}音频播放的Uid,播放当前进度

Since:
  • 10020