platform/video.videojs/dist/video.es.js
function jsonToTextTracks(json, tech) {
  json.forEach(function (track) {
    var addedTrack = tech.addRemoteTextTrack(track).track;

    if (!track.src && track.cues) {
      track.cues.forEach(function (cue) {
        return addedTrack.addCue(cue);
      });
    }
  });

  return tech.textTracks();
}
function jsonToTextTracks(json, tech) {
  json.forEach(function (track) {
    var addedTrack = tech.addRemoteTextTrack(track).track;

    if (!track.src && track.cues) {
      track.cues.forEach(function (cue) {
        return addedTrack.addCue(cue);
      });
    }
  });

  return tech.textTracks();
}
Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript
object {@link TextTrack} representations.

@param {Array} json
An array of `TextTrack` representation objects, like those that would be
produced by `textTracksToJson`.

@param {Tech} tech
The `Tech` to create the `TextTrack`s on.