1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 'use strict';
- exports.__esModule = true;
- var _button = require('./button.js');
- var _button2 = _interopRequireDefault(_button);
- var _component = require('./component.js');
- var _component2 = _interopRequireDefault(_component);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- 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; }
- 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; } /**
- * @file big-play-button.js
- */
- /**
- * The initial play button that shows before the video has played. The hiding of the
- * `BigPlayButton` get done via CSS and `Player` states.
- *
- * @extends Button
- */
- var BigPlayButton = function (_Button) {
- _inherits(BigPlayButton, _Button);
- function BigPlayButton() {
- _classCallCheck(this, BigPlayButton);
- return _possibleConstructorReturn(this, _Button.apply(this, arguments));
- }
- /**
- * Builds the default DOM `className`.
- *
- * @return {string}
- * The DOM `className` for this object. Always returns 'vjs-big-play-button'.
- */
- BigPlayButton.prototype.buildCSSClass = function buildCSSClass() {
- return 'vjs-big-play-button';
- };
- /**
- * This gets called when a `BigPlayButton` "clicked". See {@link ClickableComponent}
- * for more detailed information on what a click can be.
- *
- * @param {EventTarget~Event} event
- * The `keydown`, `tap`, or `click` event that caused this function to be
- * called.
- *
- * @listens tap
- * @listens click
- */
- BigPlayButton.prototype.handleClick = function handleClick(event) {
- this.player_.play();
- var cb = this.player_.getChild('controlBar');
- var playToggle = cb && cb.getChild('playToggle');
- if (!playToggle) {
- this.player_.focus();
- return;
- }
- this.setTimeout(function () {
- playToggle.focus();
- }, 1);
- };
- return BigPlayButton;
- }(_button2['default']);
- /**
- * The text that should display over the `BigPlayButton`s controls. Added to for localization.
- *
- * @type {string}
- * @private
- */
- BigPlayButton.prototype.controlText_ = 'Play Video';
- _component2['default'].registerComponent('BigPlayButton', BigPlayButton);
- exports['default'] = BigPlayButton;
|