Fix infinite loop on video duration

Problem:
If the target of vlcplayer was wrong there is an infinite loop to get the
video duration. We wait the video display to get the video
duration. (vlc.input.hasVout)
target wrong => no diplay => inifinite loop

Fix:
To remove the loop, we now waiting for states "PLAYING" of the player.
If the target is wrong, player never go into the state "PLAYING" mean
there is an error.
If the state is "PLAYING" we can get the video duration

Tested:
Chrome 36.0 -> OK
Firefox 33.1 -> OK
Internet Explorer 11 -> NOT OK