gkatsev/video.js — pull request #9 by dmlap (2014-12-31 23:07:02+00:00)
Title: Detect mode change event support and polyfill it if necessary

On iOS7, mode changes to text tracks do not trigger a change event on the associated TextTrackList. That was causing menu items to not update when the currently enabled track was changed and leave all previously selected menu items in the selected state permanently. This change looks for evidence that change event support is in place and if it's not, triggers synthetic change events whenever a menu item is clicked. It does not handle situations where the text track mode was changed programmatically because it doesn't seem possible to detect when native TextTrack objects are in use. In that case, a change event could be fired at the TextTrackList manually to keep everything in sync.