Created
May 26, 2016 13:10
-
-
Save MrMamen/66c8453b60f62900dfe139cc3e202382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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