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

Forums

/

Stopping a chain of mutual triggering SEEK event?

1 reply [Last post]

Re: my previous thread,
I think I can state the problem more clearly this way.

I want two players to synch on clicking the slidebar. I.e. if I slide on playerA, playerB gets to the same point and viceversa.

Ideally, I would like to distinguish between "internal" SEEK events and those caused by clicks on the slider. Is this possible?

What I do now, is I have a monitor for SEEK events (pseudocode):
1) if playerA get SEEKed -> playerB.sendEvent (SEEK)
2) if playerB get SEEKed -> playerA.sendEvent (SEEK)

Problem is, the call to sendEvent triggers another SEEK event that leeds to a loop of SEEK event triggering.

Is there any way to stop it/deal with it?

Thanks,

Hi Giuseppe,

There's really no way to do this with the player - a seek event is a seek event. You'd have to simply keep track of the seek in JavaScript and ignore it.