time-divider.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. 'use strict';
  2. exports.__esModule = true;
  3. var _component = require('../../component.js');
  4. var _component2 = _interopRequireDefault(_component);
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  6. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7. 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; }
  8. 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; } /**
  9. * @file time-divider.js
  10. */
  11. /**
  12. * The separator between the current time and duration.
  13. * Can be hidden if it's not needed in the design.
  14. *
  15. * @extends Component
  16. */
  17. var TimeDivider = function (_Component) {
  18. _inherits(TimeDivider, _Component);
  19. function TimeDivider() {
  20. _classCallCheck(this, TimeDivider);
  21. return _possibleConstructorReturn(this, _Component.apply(this, arguments));
  22. }
  23. /**
  24. * Create the component's DOM element
  25. *
  26. * @return {Element}
  27. * The element that was created.
  28. */
  29. TimeDivider.prototype.createEl = function createEl() {
  30. return _Component.prototype.createEl.call(this, 'div', {
  31. className: 'vjs-time-control vjs-time-divider',
  32. innerHTML: '<div><span>/</span></div>'
  33. });
  34. };
  35. return TimeDivider;
  36. }(_component2['default']);
  37. _component2['default'].registerComponent('TimeDivider', TimeDivider);
  38. exports['default'] = TimeDivider;