--- /dev/null
+'use strict';
+
+exports.__esModule = true;
+
+var _component = require('../../component.js');
+
+var _component2 = _interopRequireDefault(_component);
+
+var _fn = require('../../utils/fn.js');
+
+var Fn = _interopRequireWildcard(_fn);
+
+var _formatTime = require('../../utils/format-time.js');
+
+var _formatTime2 = _interopRequireDefault(_formatTime);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
+
+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 play-progress-bar.js
+ */
+
+
+/**
+ * Shows play progress
+ *
+ * @extends Component
+ */
+var PlayProgressBar = function (_Component) {
+ _inherits(PlayProgressBar, _Component);
+
+ /**
+ * Creates an instance of this class.
+ *
+ * @param {Player} player
+ * The `Player` that this class should be attached to.
+ *
+ * @param {Object} [options]
+ * The key/value store of player options.
+ */
+ function PlayProgressBar(player, options) {
+ _classCallCheck(this, PlayProgressBar);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, player, options));
+
+ _this.updateDataAttr();
+ _this.on(player, 'timeupdate', _this.updateDataAttr);
+ player.ready(Fn.bind(_this, _this.updateDataAttr));
+
+ if (options.playerOptions && options.playerOptions.controlBar && options.playerOptions.controlBar.progressControl && options.playerOptions.controlBar.progressControl.keepTooltipsInside) {
+ _this.keepTooltipsInside = options.playerOptions.controlBar.progressControl.keepTooltipsInside;
+ }
+
+ if (_this.keepTooltipsInside) {
+ _this.addClass('vjs-keep-tooltips-inside');
+ }
+ return _this;
+ }
+
+ /**
+ * Create the `Component`'s DOM element
+ *
+ * @return {Element}
+ * The element that was created.
+ */
+
+
+ PlayProgressBar.prototype.createEl = function createEl() {
+ return _Component.prototype.createEl.call(this, 'div', {
+ className: 'vjs-play-progress vjs-slider-bar',
+ innerHTML: '<span class="vjs-control-text"><span>' + this.localize('Progress') + '</span>: 0%</span>'
+ });
+ };
+
+ /**
+ * Update the data-current-time attribute on the `PlayProgressBar`.
+ *
+ * @param {EventTarget~Event} [event]
+ * The `timeupdate` event that caused this to run.
+ *
+ * @listens Player#timeupdate
+ */
+
+
+ PlayProgressBar.prototype.updateDataAttr = function updateDataAttr(event) {
+ var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();
+
+ this.el_.setAttribute('data-current-time', (0, _formatTime2['default'])(time, this.player_.duration()));
+ };
+
+ return PlayProgressBar;
+}(_component2['default']);
+
+_component2['default'].registerComponent('PlayProgressBar', PlayProgressBar);
+exports['default'] = PlayProgressBar;