Getting the cues from a VTT chapters track with Video.js
<p>I would like to get the cues from the chapters file loaded in my Video.js object. I've already find how to get the track but I need its <code>id</code> in order to access it.</p>

<pre><code>player.textTracks().getTrackById(&lt;trackID&gt;);
</code></pre>

<p>I found out where the <code>id</code> is defined in the Video.js 5.14.0 library:</p>

<pre><code>// video.js/dist/video.js (line 19195)
var trackProps = {
  id: options.id || 'vjs_track_' + Guid.newGUID(),
  kind: options.kind || '',
  label: options.label || '',
  language: options.language || ''
};
</code></pre>

<p>It seems that you can define your own <code>id</code> by passing an object to the function:</p>

<pre><code>// video.js/dist/video.js (line 19178)
var options = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : {};
</code></pre>

<p>I load the chapter track as follow:</p>

<pre><code>&lt;track kind="chapters" src="chapters.vtt" srclang="en" default&gt;
</code></pre>

<p>I've read that you can dynamically add track files but you will have to reload the Video.js object. </p>