Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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