formatTimeCallback(seconds, pxPerSec) , pxPerSec is undefined and v7 differences #4263
Unanswered
MrEdwards007
asked this question in
Q&A
Replies: 1 comment
-
|
Thanks for catching this inconsistency between the versions! https://wavesurfer.xyz/example/timeline-notches/ is an old v6 example not linked anywhere on the website. The new example Timeline in v7 is here: https://wavesurfer.xyz/examples/?timeline-custom.js (it also links to the API reference). Since this is not a bug, I'm going to transfer this issue to Q&A. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
I'm using wavesufer v7 via the online scripts
I was using https://wavesurfer.xyz/example/timeline-notches/ as a guide for addressing my needs in formatting the timeline string "formatTimeCallback" and I figured out why it wasn't working as expected. I was getting an 'undefined' on 'pxPerSec' when I output the information to the console. I didn't cause the program to stop working but did cause it to not work correctly.
So, based on what I'm seeing in version 6, this should be functional but I am using version 7 and 'pxPerSec' is no longer being passed to the callback.
I could not find any notes for version 7 indicating pxPerSec was removed but it is definitely not being passed
I have a workaround, which takes the instance variable and then performs the pxPerSec calculation but wanted to ensure that either this a documented change (loss of pxPerSec as an input) or treated as a bug.
Also in v7 timeline plugin, only primaryColor appears to have an effect, the others are ignored.
After a lot of digging, I was able to affect them with CSS styling
For future reference, others may need to affect the timeline and tickmarks is the style section of the CSS.
I really struggled to find and affect the timeline, so this information may be of value.
Environment
Minimal code snippet
Expected result
Obtained result
Screenshots
Beta Was this translation helpful? Give feedback.
All reactions