SevenOutman / vue-aplayer

:cake: Easy-to-use music player for Vue 2.x
https://vue-aplayer.js.org
MIT License
1.32k stars 201 forks source link

aplayer progress drag event desktop browser. #84

Open volkanciloglu opened 6 years ago

volkanciloglu commented 6 years ago

I get music from an API. the source URL of your music is like this: test.app.com/file?id=123451234123

the list is working. But when I push the progress bar, it reacts wrongly. the song is starting from the beginning.

<div class="main-player" v-if="list.length">
    <music 
      :music="list[0]"
      :list="list"
      theme="#5b246d"
      listMaxHeight="90px"
      listFolded
    />
</div>
SevenOutman commented 6 years ago

@VCodepp This piece of code looks fine to me. A possible cause is your list may be a computed value, thus list[0] turns out to be a new object everytime. Check if it does.

volkanciloglu commented 6 years ago

Yes list is computed value. because I use VUEX getters music list.

list value only works once

computed: {
    list() {
      return this.$store.state.musicPlayer;
    },
    song() {
      return this.$store.state.musicPlayer[0];
    }
}
SevenOutman commented 6 years ago

@VCodepp The player starts from beginning probably because the music it receives has changed. The mechanism is similar to #16 . The music before and after may look equal but are actually two individual objects. Check the way you update your store and see if that can happen.

volkanciloglu commented 6 years ago

VUEX getters mainmusiclist before value length 0 after length 7. Is the problem here?

I never solved the problem.

volkanciloglu commented 6 years ago

The extensions in my music API are not mp3.

That's why the progress bar may be working incorrectly. But it's interesting to playing music.

I do not think it has a solution. So I close this question.

volkanciloglu commented 6 years ago

Hi @SevenOutman this progress bar Working IE11 and Firefox but not working chrome/opera