</script><linkhref="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"rel="stylesheet"type="text/css"/><!-- there are many other style for highlighted code here: https://cdnjs.com/libraries/highlight.js --><linkrel="stylesheet"type="text/css"href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/atelier-forest.light.min.css"/><linkrel="stylesheet"type="text/css"href="css/api-docs.css"/><linkrel="canonical"href="https://docs.videojs.com/TextTrackButton.html">
<pclass="legacydocsnote">This documentation is for an outdated version of Video.js. See <ahref="https://docs.videojs.com/TextTrackButton.html">documentation for the current release</a>.
<sectionid="index"class="side-nav"><h2class="sideNavHeader"><ahref="index.html">API Index</a></h2><divid="memberIndex"class="member-index"><h4>Inherited Methods from MenuButton</h4><ul><li><ahref="#MethodsbuildCSSClass">buildCSSClass</a></li><li><ahref="#MethodscreateEl">createEl</a></li><li><ahref="#MethodscreateItems">createItems</a></li><li><ahref="#MethodscreateMenu">createMenu</a></li><li><ahref="#MethodshandleClick">handleClick</a></li><li><ahref="#MethodshandleKeyPress">handleKeyPress</a></li><li><ahref="#MethodshandleSubmenuKeyPress">handleSubmenuKeyPress</a></li><li><ahref="#MethodspressButton">pressButton</a></li><li><ahref="#MethodsunpressButton">unpressButton</a></li><li><ahref="#Methodsupdate">update</a></li></ul><h4>Inherited Methods from Button</h4><ul><li><ahref="#MethodsaddChild">addChild</a></li></ul><h4>Inherited Methods from ClickableComponent</h4><ul><li><ahref="#MethodscontrolText">controlText</a></li><li><ahref="#MethodshandleBlur">handleBlur</a></li><li><ahref="#MethodshandleFocus">handleFocus</a></li></ul><h4>Inherited Methods from Component</h4><ul><li><ahref="#Methods$">$</a></li><li><ahref="#Methods$$">$$</a></li><li><ahref="#MethodsaddClass">addClass</a></li><li><ahref="#Methodschildren">children</a></li><li><ahref="#MethodsclearInterval">clearInterval</a></li><li><ahref="#MethodsclearTimeout">clearTimeout</a></li><li><ahref="#MethodscontentEl">contentEl</a></li><li><ahref="#Methodsdimensions">dimensions</a></li><li><ahref="#Methodsdispose">dispose</a></li><li><ahref="#Methodsel">el</a></li><li><ahref="#MethodsenableTouchActivity">enableTouchActivity</a></li><li><ahref="#Methodsextend">extend</a></li><li><ahref="#MethodsgetChild">getChild</a></li><li><ahref="#MethodsgetChildById">getChildById</a></li><li><ahref="#MethodsgetComponent">getComponent</a></li><li><ahref="#MethodshasClass">hasClass</a></li><li><ahref="#Methodsheight">height</a></li><li><ahref="#Methodshide">hide</a></li><li><ahref="#Methodsid">id</a></li><li><ahref="#MethodsinitChildren">initChildren</a></li><li><ahref="#Methodsname">name</a></li><li><ahref="#Methodsoff">off</a></li><li><ahref="#Methodson">on</a></li><li><ahref="#Methodsone">one</a></li><li><ahref="#Methodsoptions">options</a></li><li><ahref="#Methodsplayer">player</a></li><li><ahref="#Methodsready">ready</a></li><li><ahref="#MethodsregisterComponent">registerComponent</a></li><li><ahref="#MethodsremoveChild">removeChild</a></li><li><ahref="#MethodsremoveClass">removeClass</a></li><li><ahref="#MethodssetInterval">setInterval</a></li><li><ahref="#MethodssetTimeout">setTimeout</a></li><li><ahref="#Methodsshow">show</a></li><li><ahref="#MethodstoggleClass">toggleClass</a></li><li><ahref="#Methodstrigger">trigger</a></li><li><ahref="#MethodstriggerReady">triggerReady</a></li><li><ahref="#Methodswidth">width</a></li></ul></div></section><divid="main"class="section"><sectionid="top"class="section"><h1>TextTrackButton</h1><divstyle="border:none"id="classDescription"class="description"><p>The base class for buttons that toggle specific text track types (e.g. subtitles)</p></div><p>DEFINED IN: <ahref="https://github.com/videojs/video.js/blob/master/src/js/control-bar/text-track-controls/text-track-button.js#L10">text-track-button.js line number: 10</a></p><p>EXTENDS: <ahref="menu-button.html">menu-button.js</a></p><h3>Constructor</h3><pre><code>TextTrackButton( player,[options] )</code></pre><h4>Parameters</h4><table><thead><tr><th>name</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td>player</td><td>Player|Object</td></tr><tr><td>options</td><td>Object</td></tr></tbody></table></section></div><scriptsrc="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js">