platform/video.videojs/dist/video.es.js
function parseCues(srcContent, track) {
  var parser = new window.WebVTT.Parser(window, window.vttjs, window.WebVTT.StringDecoder());
  var errors = [];

  parser.oncue = function (cue) {
    track.addCue(cue);
  };

  parser.onparsingerror = function (error) {
    errors.push(error);
  };

  parser.onflush = function () {
    track.trigger({
      type: 'loadeddata',
      target: track
    });
  };

  parser.parse(srcContent);
  if (errors.length > 0) {
    if (window.console && window.console.groupCollapsed) {
      window.console.groupCollapsed('Text Track parsing errors for ' + track.src);
    }
    errors.forEach(function (error) {
      return log$1.error(error);
    });
    if (window.console && window.console.groupEnd) {
      window.console.groupEnd();
    }
  }

  parser.flush();
}
function parseCues(srcContent, track) {
  var parser = new window.WebVTT.Parser(window, window.vttjs, window.WebVTT.StringDecoder());
  var errors = [];

  parser.oncue = function (cue) {
    track.addCue(cue);
  };

  parser.onparsingerror = function (error) {
    errors.push(error);
  };

  parser.onflush = function () {
    track.trigger({
      type: 'loadeddata',
      target: track
    });
  };

  parser.parse(srcContent);
  if (errors.length > 0) {
    if (window.console && window.console.groupCollapsed) {
      window.console.groupCollapsed('Text Track parsing errors for ' + track.src);
    }
    errors.forEach(function (error) {
      return log$1.error(error);
    });
    if (window.console && window.console.groupEnd) {
      window.console.groupEnd();
    }
  }

  parser.flush();
}
function parseCues ( srcContent , track ) { var parser = new window . WebVTT . Parser ( window , window . vttjs , window . WebVTT . StringDecoder ( ) ) ; var errors = [ ] ; parser . oncue = function ( cue ) { track . addCue ( cue ) ; } ; parser . onparsingerror = function ( error ) { errors . push ( error ) ; } ; parser . onflush = function ( ) { track . trigger ( { type : 'loadeddata' , target : track } ) ; } ; parser . parse ( srcContent ) ; if ( errors . length > 0 ) { if ( window . console && window . console . groupCollapsed ) { window . console . groupCollapsed ( 'Text Track parsing errors for ' + track . src ) ; } errors . forEach ( function ( error ) { return log$1 . error ( error ) ; } ) ; if ( window . console && window . console . groupEnd ) { window . console . groupEnd ( ) ; } } parser . flush ( ) ; }
@file text-track.js
 
Takes a webvtt file contents and parses it into cues

@param {string} srcContent
webVTT file contents

@param {TextTrack} track
TextTrack to add cues to. Cues come from the srcContent.

@private
@file text - track . js Takes a webvtt file contents and parses it into cues