Skip to content

Instantly share code, notes, and snippets.

@MrMamen
Created May 26, 2016 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrMamen/66c8453b60f62900dfe139cc3e202382 to your computer and use it in GitHub Desktop.
Save MrMamen/66c8453b60f62900dfe139cc3e202382 to your computer and use it in GitHub Desktop.
flashScrubber: function() {
var player = document.getElementById("flashPlayer");
if (player) {
var progress = player["JSgetCurrentPosition"];
var duration = player["JSgetDuration"];
if (progress && duration){
var newProgress = parseFloat(parseFloat(progress()/duration()*100).toFixed(2));
if (newProgress > 0) {
this.progress = newProgress;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment