Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events playing, paused , how to emit them? #145

Open
ricky11 opened this issue Nov 17, 2023 · 2 comments
Open

Events playing, paused , how to emit them? #145

ricky11 opened this issue Nov 17, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ricky11
Copy link

ricky11 commented Nov 17, 2023

From the docs, we have common events playing, paused.

I am trying to emit the events from the av-waveform as so:

  <audio autoplay color="white" ref="foo" :src="vidUrl"></audio>
  <av-waveform  @playing="isPlaying = true" @paused="isPlaying = false" @ended="isPlaying=false" :canv-width="300" class="memoClass" played-line-color="#b7c6c7" :playtime-with-ms="false" :playtime-text-bottom="true" playtime-font-color="white" noplayed-line-color="white" ref-link="foo"/>

I am trying to change the data property isPlaying to toggle a icon, there isn't an error in the console, but the data property is not switching, hence the event isn't being fired.

I also trying to do this by checking the play state by $refs.foo.paused, but i cant find the paused element on foo, but that may be another issue.

as a side note, the font-color for the wave isn't changing to white, when i add a :playtime-font-color, there is a type error.

Thanks.

@staskobzar
Copy link
Owner

It looks like these events are overwhitten by av-waveform and not pass this event to the parent element
(https://github.com/staskobzar/vue-audio-visual/blob/v2/src/components/AvWaveform.js#L191)
There should be event emit here too. av-waveform is different from other plugins because it not streaming but loading all audio on mount to build the waveform.
I will try to fix it when I have time.

Try to use RGB code instead of "white"

@staskobzar staskobzar self-assigned this Nov 17, 2023
@staskobzar staskobzar added the bug Something isn't working label Nov 17, 2023
staskobzar added a commit that referenced this issue Dec 10, 2023
@staskobzar
Copy link
Owner

emit AvWaveform event playing/paused/ended for vue2 is fixed in 2.5.1 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants