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

silvermine / videojs-quality-selector / 5728073738

pending completion
5728073738

push

github

web-flow
Merge pull request #93 from absidue/no-vjs-extend

refactor: Use ES6 classes instead of videojs.extend

0 of 35 branches covered (0.0%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 2 files covered. (100.0%)

0 of 118 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 class QualityOption extends MenuItem {
×
14

15
      /**
16
       * @inheritdoc
17
       */
18
      constructor(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
         super(player, options);
×
31

32
         this.source = source;
×
33
      }
34

35
      /**
36
       * @inheritdoc
37
       */
38
      handleClick(event) {
39
         super.handleClick(event);
×
40
         this.player().trigger(events.QUALITY_REQUESTED, this.source);
×
41
      }
42
   };
43
};
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