Use XHR's load event instead of readystatechange + readyState === DONE
Set resolution option labels even if video metadata is already loaded, and other tiny fixes.
Added explanatory comments to example.
Better clock state machine and API.
Use a checkbox to toggle subs instead of a button.
Handle unknown types gracefully in type linker.
tsnext