jPlayer
jPlayer copied to clipboard
Feature request: Delay CSS "seeking-bg" class
When there's a seek operation, the seek-bar gains a new CSS class, "seeking-bg". This is a good thing, but causes an unnecessary flash if the seek happens to be a quick operation. My app has -30s and +30s buttons, so if the user hits those a few times, they see a constant on-off flash of the seek bar.
My request is for an option that would delay "seeking-bg" class (and any other seek-related styling), e.g. a "seekDelay" option defaulting to zero. It would set a timer to add the class and cancel the timer when the player is no longer seeking after a delay.
I was working on a project recently that required this delay too... In that project we were not using the built in seeking class addition on the seek-bar.
I solved by setting up 2 sets of timeout delays... 1) seeking/seeked 2) waiting/playing.
Inside jPlayer there is no distinguishing between the events and they all call the same internal method to turn it on or off... This relates to the case above in that the seeked event seemed to screw up the delay of the waiting event, when both sets of events used the same timeout ID.
I'll leave this issue open to remind me.
This can be solved with a CSS transition-delay. http://www.w3schools.com/cssref/css3_pr_transition-delay.asp Edit: added a link
This reminds me... We should remove this seeking class in this obsolete manner. This is like an appendix. We now have the state classes being applied to the gui wrapper. I just realised that I never updated that part of jPlayer or the skins.