Do we need to set timeout both in load and play? ex: bc.. setTimeout("player.sendEvent('LOAD', {file:'"+file+"', type:'video'})",500); setTimeout("player.sendEvent('PLAY','true')",100);
For the v4.x player, the correct way to check if the player is ready is to use the playerReady() function:bc.. function playerReady(obj) { ...some action here... };
The player will call this function when it is ready.
Please see the API documentation here: *http://code.longtailvideo.com/trac/wiki/FlashAPI*
Thanks.. Do you know that i just realize why i cannot setTimeout in *'PLAY'* event? seems that settimeout is not working in 'PLAY' statement, when i try this code: bc.. setTimeout("player.sendEvent('PLAY', 'true')", 5000); why i'm not getting any delay? is there any way to set like dummy delay before playing the video? cos i also try this: bc.. setTimeout(5000); or setTimeout("",5000); delay still not working...
I found really strange behaviour in setTimeout statement, when i try this : bc.. setTimeout("player.sendEvent('PLAY')", 5000); it will not delay the 'PLAY' event, but seems it will tell the player only 'PLAY' the video for 5 seconds, is it correct behaviour? or this is some bug?