I've gone ahead and merged these two changes by TheDJ to MwEmbedSupport and TimedMediaHandler extensions (they are interdependent):
* https://gerrit.wikimedia.org/r/#/c/172556/ * https://gerrit.wikimedia.org/r/#/c/172421/
These clean up how TMH's JavaScript modules get integrated into MediaWiki's ResourceLoader, and should both reduce weird timing bugs and make it muuuch easier to refactor things further.
It's worth checking these on the beta cluster; if all is well they can go out to Wikimedia sites with the next branch point.
As an intermediary step, some weeks ago we merged this change to mark parser output requiring video modules, so the standard RL caching _should_ mean everything keeps working on cached pages once the newer revs go live:
* https://gerrit.wikimedia.org/r/#/c/230153/
With all these going out, we'll be able to finalize work on integrating the VideoJS player framework to replace our old hacked-up version of the Kaltura player, and generally modernize and vastly improve the playback experience.
-- brion