1.1.3 • Published 8 months ago

@alpha-miner/audio-player-v3 v1.1.3

Weekly downloads
-
License
-
Repository
gitlab
Last release
8 months ago

audio-player

TODO: description

Usage

import AudioPlayer from '@alpha-miner/audio-player'

<AudioPlayer :src="audioSrc" ref="audioPlayer" @playing="onTimeupdate" />
...

methods: {
  ...
  onTimeupdate({ currentTime }) {
    // 播放器内部的时间是秒,这里注意转化
    this.currentTime = currentTime * 1000;
  },
  onChangeCurrent(current) {
    this.currentTime = Number(current);
    this.$refs.audioPlayer.adjustCurrentTime(Number(current) / 1000 || 0);
  }
}
1.1.3

8 months ago