• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

silvermine / videojs-quality-selector / 197

pending completion
197

push

travis-ci-com

web-flow
Merge pull request #86 from crgwbr/crweber/es6_classes

refactor: use es6 classes

0 of 35 branches covered (0.0%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

0 of 119 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/js/components/QualityOption.js
1
var _ = require('underscore'),
×
2
    events = require('../events');
×
3

4
module.exports = function(videojs) {
×
5
   var MenuItem = videojs.getComponent('MenuItem');
×
6

7
   /**
8
    * A MenuItem to represent a video resolution
9
    *
10
    * @class QualityOption
11
    * @extends videojs.MenuItem
12
    */
13
   return videojs.extend(MenuItem, {
×
14

15
      /**
16
       * @inheritdoc
17
       */
18
      constructor: function(player, options) {
19
         var source = options.source;
×
20

21
         if (!_.isObject(source)) {
×
22
            throw new Error('was not provided a "source" object, but rather: ' + (typeof source));
×
23
         }
24

25
         options = _.extend({
×
26
            selectable: true,
27
            label: source.label,
28
         }, options);
29

30
         MenuItem.call(this, player, options);
×
31

32
         this.source = source;
×
33
      },
34

35
      /**
36
       * @inheritdoc
37
       */
38
      handleClick: function(event) {
39
         MenuItem.prototype.handleClick.call(this, event);
×
40
         this.player().trigger(events.QUALITY_REQUESTED, this.source);
×
41
      },
42

43
   });
44
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc