b95072b0 by David LaPalomento

Don't expose metadata tracks to old video.js

Feature detect support for addTextTrack so HLS remains functional with older video.js versions.
1 parent 84e4c4b4
......@@ -81,6 +81,12 @@ videojs.Hls.prototype.src = function(src) {
metadataStream = tech.segmentParser_.metadataStream,
textTrack;
// only expose metadata tracks to video.js versions that support
// dynamic text tracks (4.12+)
if (!tech.player().addTextTrack) {
return;
}
metadataStream.on('data', function(metadata) {
var i, frame, time, hexDigit;
......