Skip to content

Programatically controlling the player

Marcin Kulik 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
Fetch elapsed time $(".time-elapsed").text()
Fetch remaining time $(".time-remaining").text()
Clone this wiki locally