3 exports.__esModule = true;
5 var _textTrackButton = require('./text-track-button.js');
7 var _textTrackButton2 = _interopRequireDefault(_textTrackButton);
9 var _component = require('../../component.js');
11 var _component2 = _interopRequireDefault(_component);
13 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
15 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17 function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
19 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
20 * @file subtitles-button.js
25 * The button component for toggling and selecting subtitles
27 * @extends TextTrackButton
29 var SubtitlesButton = function (_TextTrackButton) {
30 _inherits(SubtitlesButton, _TextTrackButton);
33 * Creates an instance of this class.
35 * @param {Player} player
36 * The `Player` that this class should be attached to.
38 * @param {Object} [options]
39 * The key/value store of player options.
41 * @param {Component~ReadyCallback} [ready]
42 * The function to call when this component is ready.
44 function SubtitlesButton(player, options, ready) {
45 _classCallCheck(this, SubtitlesButton);
47 var _this = _possibleConstructorReturn(this, _TextTrackButton.call(this, player, options, ready));
49 _this.el_.setAttribute('aria-label', 'Subtitles Menu');
54 * Builds the default DOM `className`.
57 * The DOM `className` for this object.
61 SubtitlesButton.prototype.buildCSSClass = function buildCSSClass() {
62 return 'vjs-subtitles-button ' + _TextTrackButton.prototype.buildCSSClass.call(this);
65 return SubtitlesButton;
66 }(_textTrackButton2['default']);
69 * `kind` of TextTrack to look for to associate it with this menu.
76 SubtitlesButton.prototype.kind_ = 'subtitles';
79 * The text that should display over the `SubtitlesButton`s controls. Added for localization.
84 SubtitlesButton.prototype.controlText_ = 'Subtitles';
86 _component2['default'].registerComponent('SubtitlesButton', SubtitlesButton);
87 exports['default'] = SubtitlesButton;