-
-
Notifications
You must be signed in to change notification settings - Fork 269
Programatically controlling the player
David Tootill edited this page Feb 27, 2016
·
7 revisions
Here are some jQuery workarounds for controlling the player pending development of a formal API. Due to the same-origin policy, these work only with a player hosted in your web page.
Action | Coding |
---|---|
Start or stop the player | $(".playback-button").trigger("click") |
Determine if player is playing | 2 == $(".playback-button")[0].getElementsByTagName("path").length Returns true if player is playing |
Fetch elapsed time | $(".time-elapsed").text() |
Fetch remaining time | $(".time-remaining").text() |
by David Tootill