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) { ...@@ -81,6 +81,12 @@ videojs.Hls.prototype.src = function(src) {
81 metadataStream = tech.segmentParser_.metadataStream, 81 metadataStream = tech.segmentParser_.metadataStream,
82 textTrack; 82 textTrack;
83 83
84 // only expose metadata tracks to video.js versions that support
85 // dynamic text tracks (4.12+)
86 if (!tech.player().addTextTrack) {
87 return;
88 }
89
84 metadataStream.on('data', function(metadata) { 90 metadataStream.on('data', function(metadata) {
85 var i, frame, time, hexDigit; 91 var i, frame, time, hexDigit;
86 92
......