videojs/video.js — pull request #1313 by mattosborn (2014-06-25 10:48:45+00:00)
Title: exporting techName and loadTech

Exporting techName and loadTech. The use case is to allow videojs-contrib-ads to snapshot and restore the current loaded tech.

Switching tech would be better done by video.js transparently based on the source object passed to .src(), but the player does not retain source type information for later retrieval, only the source url, and modifying that would be a breaking change.

In videojs-contrib-ads, the tech needs to be snapshotted and restored when the ad relies on a different tech to the content video, as the videojs player does not check for compatibility when passing a string to .src()
https://github.com/guardian/videojs-contrib-ads/commit/e7c14b34781742dc6a7ed41234ea1e7f9fa18c9e