Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

How to seek() then pause() with JWP 5.4

8 replies [Last post]
Reply

Hi folks,

Does anyone know how to get JW PLayer v5.4 (either the Flash rendering or the HTML5 rendering) to pause after a seek() command?

I'm trying to get the video to step 0.01 seconds forward or backward when a user clicks the fine-grain control buttons (or uses the left or right arrow keys). This is so they can snap a framegrab with better precision.

I'm not sure if this is even possible but I've tried a few things with no luck. Such as the following:

var stepTo = jwplayer("video_player").getPosition() + 0.01;

jwplayer("video_player").seek(stepTo).onComplete(function(){
    jwplayer('video_player').pause();
});

And:

jwplayer("video_player").pause().seek(stepTo);

And:

jwplayer("jwplayer_container").seek(stepTo).pause();

And:

jwplayer("video_player").pause().play().pause();

I've also seen that the 'Shortcuts' plugin has this feature, but that plugin ins't compatible with v5.4 yet.

Thanks for any help.

Reply

There are a few issues here:

First, it's impossible to do sub-second seeking with any accuracy / consistency. The reason for this is that the underlying technologies (Flash's NetStream and HTML5 <video>) will only seek to keyframes. RTMP will sometimes seek to points other than keyframes, but again, that's not guaranteed.

As for always playing after a seek, we feel that it's the correct behavior, but we've been getting quite a bit of feedback, so we may revisit later on.

Reply

It would be very nice to add a parameter to the seek function to specify if the player should pause or play after seeking.

I just try to implement a seek then pause function with multiple players on same page but this look like a huge labyrinthine system (which don't really work in fact) :)

Philippe

Reply

Thanks for the feedback. We'll investigate adding this into a later release.

Reply

Zach,

Definitely include the ability to pause after seek.
This functionality, to me, is crucial for several projects I have going.
Being able to seek to a given position and then pause will allow me to show certain frames/positions in a video for Illustrative purposes.

Reply

Hi together!

I second what the others already expressed that the behaviour of jwPlayer in regards to play state + seek is very unsatisfactory. I wouldn't bother if I could optionally change that default, so that seek respects the former play state and keeps away from triggering a play. But for whatever reason that is not possible. And that's not cool. And there's not even a trick/workaround that you will offer us :(

Maybe you cannot imagine which scenario might need a reversed default behaviour, so I tell you what I have here:

I built an online video editing tool for the largest German IT video training publisher. Inside my tool, you have a timeline and a video preview, like in videocutting software. Of course both are linked over cross. Inside that timeline you then place meta data like glossary tags, chapter marks and subtitle overlays. Now sometimes the editors need to be able to scratch in the timeline while the video is playing to find (hear) the right entry point for a chapter mark. Or they pause the video and jump from mark to mark. So when the video is paused, it has to absolutely stay paused after any seek events. Alas, jwPlayer does not respect that.

Maybe you see now, that you are not always dealing with Youtube style scenarios and that what is good in Youtube might not be good in general.

What is so hard to add an extra option/parameter to the seek method like you did for play and pause already?

Looking forward to your answer

Christian

Reply

Zach,

Neglecting fine-grain, can we have a direct JavaScript command to pause before seek() and also for load().

Reply
Reply

Wa alaikum Salam

Thanks. Updated at page bottom of http://goo.gl/xfICW .

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options