Skip to content

Instantly share code, notes, and snippets.

/*
This script extends jwplayer api instances with a `_history`
property which is a hash of event types including "all".
After including this on the page, to check if a "play" event fired,
call `jwplayer()._history.play`. Initially this returns `undefined`.
Once the event is fired an array is populated with an object for each
event fired.
The `jwplayer()._history.all` array will always be present and contains