betajs/betajs-media-components

View on GitHub
src/dynamics/video_player/player/states.js

Summary

Maintainability
F
1 wk
Test Coverage

File states.js has 839 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:VideoPlayer.Dynamics.PlayerStates.State", [
    "base:States.State",
    "base:Events.ListenMixin",
    "base:Objs"
], function(State, ListenMixin, Objs, scoped) {
Severity: Major
Found in src/dynamics/video_player/player/states.js - About 2 days to fix

    Function uploadTextTrackFile has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            uploadTextTrackFile: function(file, locale) {
                var _dynamics, _uploader, _initialTracks, _counter;
                _dynamics = this.dyn.parent();
    
                // Check either recorder or player dynamics
    Severity: Major
    Found in src/dynamics/video_player/player/states.js - About 2 hrs to fix

      Function _started has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _started: function() {
                  this.dyn.set("autoplay", false);
                  if (this.dyn.get("adshassource")) {
                      // As during a loop, we will play player after ended event fire, need initial cover will be hidden
                      this.listenOn(this.dyn.channel("ads"), "contentPauseRequested", function() {
      Severity: Major
      Found in src/dynamics/video_player/player/states.js - About 2 hrs to fix

        Function _started has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _started: function() {
                    if (this.dyn.get("adshassource")) {
                        if (this._triggerLoadAds()) {
                            if (this.dyn.get("fullscreened") && (Info.isMobile() && Info.isiOS())) {
                                if (this.dyn.get("adsplayer_active")) this.dyn.set("adsplayer_active", false)
        Severity: Minor
        Found in src/dynamics/video_player/player/states.js - About 1 hr to fix

          Function _started has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      _started: function() {
                          if (this.state_name() === "PlayAd")
                              throw Error("PlayAd should be an abstract state.");
                          this.dyn.set("playing_ad", true);
                          if (this.dyn.get("playing")) {
          Severity: Minor
          Found in src/dynamics/video_player/player/states.js - About 1 hr to fix

            Function _started has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _started: function() {
                        if (!this.dyn.get("adshassource")) {
                            if (this.dyn.get("floatingoptions.floatingonly") || this.dyn.get("view_type") === "is_floating") {
                                this.dyn.execute("close_floating");
                            } else {
            Severity: Minor
            Found in src/dynamics/video_player/player/states.js - About 1 hr to fix

              Function _started has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _started: function() {
                          this.dyn.set("autoplay", this.dyn.get("continuousplayback"));
                          this.dyn.set("playbackcount", this.dyn.get("playbackcount") + 1);
                          if (this.dyn.get("playlist") && this.dyn.get("playlist").length > 0) {
                              this._resetPlayerAttrs();
              Severity: Minor
              Found in src/dynamics/video_player/player/states.js - About 1 hr to fix

                Function __loadVideo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        __loadVideo: function() {
                            this.listenOn(this.dyn, "error:video", function() {
                                this.next("ErrorVideo");
                            }, this);
                            this.listenOn(this.dyn, "playing", function() {
                Severity: Minor
                Found in src/dynamics/video_player/player/states.js - About 1 hr to fix

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                          this.listenOn(this.dyn.channel("ads"), "log", function(event) {
                                              if (!event.getAdData().adError || !this.dyn.get("adtagurlfallbacks") || this.dyn.get("adtagurlfallbacks").length === 0) return;
                                              this.dyn.set("adtagurl", this.dyn.get("adtagurlfallbacks").shift());
                                              this.dyn.brakeAdsManually();
                                              if (!this.dyn.get("adsplayer_active")) this.dyn.set("adsplayer_active", true);
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 day to fix
                  src/dynamics/video_player/player/states.js on lines 807..818

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 237.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                  this.listenOn(this.dyn.channel("ads"), "log", function(event) {
                                      if (!event.getAdData().adError || !this.dyn.get("adtagurlfallbacks") || this.dyn.get("adtagurlfallbacks").length === 0) return;
                                      this.dyn.set("adtagurl", this.dyn.get("adtagurlfallbacks").shift());
                                      this.dyn.brakeAdsManually();
                                      if (!this.dyn.get("adsplayer_active")) this.dyn.set("adsplayer_active", true);
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 day to fix
                  src/dynamics/video_player/player/states.js on lines 490..501

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 237.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              this.listenOn(this.dyn, "playing", function() {
                                  if (this.destroyed() || this.dyn.destroyed())
                                      return;
                                  if (this.dyn.get("autoseek"))
                                      this.dyn.execute("seek", this.dyn.get("autoseek"));
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 3 hrs to fix
                  src/dynamics/audio_player/player/states.js on lines 169..175

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 105.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                  Scoped.define("module:VideoPlayer.Dynamics.PlayerStates.FatalError", [
                      "module:VideoPlayer.Dynamics.PlayerStates.State"
                  ], function(State, scoped) {
                      return State.extend({
                          scoped: scoped
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 3 hrs to fix
                  src/dynamics/audio_player/player/states.js on lines 56..70

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 101.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              Objs.iter(Objs.extend({
                                  "adscontrolbar": false,
                                  "loader": false,
                                  "message": false,
                                  "playbutton": false,
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 2 hrs to fix
                  src/dynamics/image_capture/capture/states.js on lines 14..22

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 87.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              } else {
                                  this.listenOn(this.dyn, "error:poster", function() {
                                      this.next("LoadPlayerDirectly");
                                  }, this);
                                  this.listenOn(this.dyn, "image-attached", function() {
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 2 hrs to fix
                  src/dynamics/audio_player/player/states.js on lines 105..113

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 85.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                              var dynamic = this.auto_destroy(new this.dyn.cls({
                                  element: popup.containerInner,
                                  attrs: Objs.extend(this.dyn.cloneAttrs(), this.dyn.popupAttrs())
                              }));
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/video_recorder/recorder/states.js on lines 250..253

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 73.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                  if (this.dyn.parent().record !== undefined && this.dyn.parent().host !== undefined) {
                                      this.dyn._isRecorder = true;
                                      this.dyn._recorderDyn = this.dyn.parent();
                                      this.dyn._recorderHost = this.dyn._recorderDyn.host;
                                  }
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/audio_player/player/states.js on lines 22..26

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 72.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              if (this.dyn.get("playlist") && this.dyn.get("playlist").length > 0) {
                                  this._resetPlayerAttrs();
                  
                                  var currentIndex = this.dyn.get("current_video_from_playlist");
                                  var nextIndex = this.dyn.get("next_video_from_playlist");
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/audio_player/player/states.js on lines 273..305

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 71.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                              if (this.dyn.get("adtagurlfallbacks") && this.dyn.get("adtagurlfallbacks").length > 0) {
                                                  this.dyn.set("adtagurl", this.dyn.get("adtagurlfallbacks").shift());
                                                  this.dyn.scopes.adsplayer.execute("requestAds");
                                              }
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/video_player/player/states.js on lines 506..511

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 62.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                              } else if (this.dyn.get("adtagurlfallbacks") && this.dyn.get("adtagurlfallbacks").length > 0) {
                                                  this.dyn.set("adtagurl", this.dyn.get("adtagurlfallbacks").shift());
                                                  this.dyn.scopes.adsplayer.execute("requestAds");
                                              } else {
                                                  this.next(this._nextState());
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/video_player/player/states.js on lines 481..484

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 62.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                              this.listenOn(this.dyn, "error:poster", function() {
                                  if (!this.dyn.get("states").poster_error.ignore)
                                      this.next("PosterError");
                              }, this);
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/video_player/player/states.js on lines 638..641

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                  this.listenOn(this.dyn, "error:poster", function() {
                                      if (!this.dyn.get("states").poster_error.ignore)
                                          this.next("PosterError");
                                  }, this);
                  Severity: Major
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 1 hr to fix
                  src/dynamics/video_player/player/states.js on lines 269..272

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                              this.listenOn(this.dyn, "change:buffering", function() {
                                  this.dyn.set("loader_active", this.dyn.get("buffering"));
                              }, this);
                  Severity: Minor
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 50 mins to fix
                  src/dynamics/audio_player/player/states.js on lines 248..250

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 51.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              popup.on("hide", function() {
                                  this._delegatedPlayer = null;
                                  dynamic.destroy();
                                  popup.destroy();
                              }, this);
                  Severity: Minor
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 40 mins to fix
                  src/dynamics/video_recorder/recorder/states.js on lines 256..260

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 49.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                                  this.dyn.set("hasnext", this.dyn.get("loop") || this.dyn.get("loopall") || !this.dyn.get("lastplaylistitem"));
                  Severity: Minor
                  Found in src/dynamics/video_player/player/states.js and 1 other location - About 35 mins to fix
                  src/dynamics/video_recorder/recorder/states.js on lines 1095..1095

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 47.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  There are no issues that match your filters.

                  Category
                  Status