staskobzar / vue-audio-visual

VueJS audio visualization components
MIT License
717 stars 112 forks source link

currentTime is always set as 0 #59

Closed finn-dev closed 3 years ago

finn-dev commented 3 years ago

Hi. First of all, thanks for your plugin. This is really useful one.


I am now facing problems on seek from I checked and in AvWaveform.js -- line 395 this.audio.currentTime = e.offsetX / this.canvWidth * this.duration

While i am debugging, i found out that, right side is correct, but when trying to update currentTime, it is becoming 0. So player plays from the beginning again.

Any idea? With your demo, it is working fine, but on my hand it s not. :( Hope for your quick support. :)

Thank you.

staskobzar commented 3 years ago

Hi,

I actually had this problem too and I noticed that it appears during development but works fine in production. Then it also happened to work fine in development too. After that I was not be able to reproduce it, probably I have changed something that fixed it.

Can you post a code that reproduce this problem, please? I will try to take a look and fix this week-end. Thanks

finn-dev commented 3 years ago

Hi. Thanks for your kind, quick response. I think i found the problem. Code is very simple, just same as demo. Looks like, the problem is my platform. Even when i put simple

Thank you.

PS: Mine is Laravel-mix + Vue

staskobzar commented 3 years ago

Interesting... I think I had this problem with rails + webpacker + vue. My last project was vue-cli based and I do not remember I had this problem.

Thanks for the details

finn-dev commented 3 years ago

Hi

Back. So after npm uninstall vue-audio-visual, it is again working with simple

Thank you.

staskobzar commented 3 years ago

To proceed I need to be able to reproduce it. Please, confirm that the demo works for you. When you download the project, change to "demo" folder and run

npm install
npm run serve

Do you still have the problem? What browser do you use? Do you have anything in console that can help to identify the problem?

I do not know Laravel-mix and have no experience with it. If it is connected to Laravel environment, can you create a simple github repo with Laravel that reproduces this problem and give me a link?

Thanks

finn-dev commented 3 years ago

image I am trying npm run serve for the demo and got this. Is this normal?

staskobzar commented 3 years ago

If it freezes it is not normal, of course. Maybe you have some nodejs problems. Or you might want to remove node_modules folder and re-try to install again.

finn-dev commented 3 years ago

same. just removed node_modules and try again, but still stuck.

staskobzar commented 3 years ago

Sorry, I never tried it on windows but I can build it on my PC and github can build it on its platform. make sure you have the latest node version. Maybe there is environment problems.

finn-dev commented 3 years ago

Hi I just upgrade to v14.15.0 And still same. Is this one working on your side?

staskobzar commented 3 years ago

I have node v14.12.0. I also have another server with v10.18.1, just tried and it also works. Just installed the latest node v14.15.0 on another machine and it also works. Those are all linux machines.

finn-dev commented 3 years ago

I tried on Windows, let me try in linux.

finn-dev commented 3 years ago

image Now getting this one.

finn-dev commented 3 years ago

Finally running in Linux. I will check my platform.

staskobzar commented 3 years ago

Yeah, the error I got too. just a minor syntax error. I will push the fix later to github.

finn-dev commented 3 years ago

Thank you. Hope you will fix it very soon.