getDuration multiple players

Hi,

I have 2 players on my page and i want to get the duration of each of the current clips playing in each player onFlowPlayerReady.
The players ID changes every time the page is reloaded.

does anyone have an idea how i can do this?

Thanx!!

api's picture

playerId in every clip

The latest release is all that's needed to solve your problems :-) You can specify a playerId for the player in configuration. After that the playerId is then passed in every callback where the clip is passed as the parameter.

Just include playerId in the confituration, for example:

config = {
playerId: '666',
videoFile 'foobar.mp4'
}

how to get playerId onflowplayerready()

Thanx for your reply!

I downloaded the lastest version of flowplayer (2.2.2). and i got the playerId working.

is there i way to get the playerId from the onFlowPlayerReady function?

Thanx

api's picture

getPlayerId()

You can use the getPlayerId() method to query it from the player.