betajs/betajs-media-components

View on GitHub

Showing 162 of 10,521 total issues

Function _findNextTabStop has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                _findNextTabStop: function(parentElement, ev, callback, direction) {
                    var _currentIndex, _direction, _tabIndexes, _tabIndexesArray, _maxIndex, _minIndex, _looked, _tabIndex, _delta, _element, _imagePlayersCount;
                    _maxIndex = _minIndex = 0;
                    _direction = direction || 1;
                    _element = ev.target;
Severity: Minor
Found in src/dynamics/image_viewer/viewer/image_viewer.js - About 1 hr to fix

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

                _initIntersectionObservers: function() {
                    var elementFirstObservation = true;
                    this._elementObserver = new IntersectionObserver(elementCallback.bind(this), {
                        threshold: this.threshold
                    });
    Severity: Minor
    Found in src/dynamics/_common/sticky_handler.js - About 1 hr to fix

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

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

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

                                var selectors = Objs.map(this.get("outsource-selectors").split(/;/), function(item) {
                                    var obj = {
                                        options: {
                                            type: 'select',
                                            disabled: true,
        Severity: Minor
        Found in src/dynamics/video_recorder/recorder/recorder.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 tab_index_move has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                tab_index_move: function(ev, nextSelector, focusingSelector) {
                                    if (this.get("preventinteractionstatus")) return;
                                    var _targetElement, _activeElement, _selector, _keyCode;
                                    _keyCode = ev.which || ev.keyCode;
                                    _activeElement = this.activeElement();
            Severity: Minor
            Found in src/dynamics/video_player/player/player.js - About 1 hr to fix

              Function create has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              create: function() {
                                  // Initialize AudioContext
                                  WebRTCSupport.globals();
                                  if (this.get("theme")) this.set("theme", this.get("theme").toLowerCase());
                                  if (this.get("theme") in Assets.recorderthemes) {
              Severity: Minor
              Found in src/dynamics/audio_recorder/recorder/recorder.js - About 1 hr to fix

                Function tab_index_move has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                    tab_index_move: function(ev, nextSelector, focusingSelector) {
                                        var _targetElement, _activeElement, _selector, _keyCode;
                                        _keyCode = ev.which || ev.keyCode;
                                        _activeElement = this.activeElement();
                                        if (_keyCode === 13 || _keyCode === 32) {
                Severity: Minor
                Found in src/dynamics/audio_player/player/player.js - About 1 hr to fix

                  Function tab_index_move has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                      tab_index_move: function(ev, nextSelector, focusingSelector) {
                                          var _targetElement, _activeElement, _selector, _keyCode;
                                          _keyCode = ev.which || ev.keyCode;
                                          _activeElement = this.activeElement();
                                          if (_keyCode === 13 || _keyCode === 32) {
                  Severity: Minor
                  Found in src/dynamics/image_viewer/viewer/image_viewer.js - About 1 hr to fix

                    Function containerSizingStyles:outstream,aspect_ratio,height,width,is_floating,hideplayer,floatingoptions.floatingonly,fullscreened,showsidebargallery,gallerysidebar,layout has 11 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                            outstream,
                                            aspectRatio,
                                            height,
                                            width,
                                            isFloating,
                    Severity: Major
                    Found in src/dynamics/video_player/player/player.js - About 1 hr to fix

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

                                          select_frame: function() {
                                              var player = this.parent().player;
                                              var position = player.position();
                                              var imageSelected = false;
                      
                      
                      Severity: Minor
                      Found in src/dynamics/video_player/controlbar/controlbar.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 _videoRecorderWrapperOptions has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          _videoRecorderWrapperOptions: function() {
                                              var _screen = null;
                                              var _resizeMode = this.get("resizemode");
                                              if ((this.get("allowscreen") && this.get("record_media") === "screen") || (this.get("allowmultistreams") && this.get("record_media") === "multistream")) {
                                                  _screen = this.get("screen");
                          Severity: Minor
                          Found in src/dynamics/video_recorder/recorder/recorder.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

                              Consider simplifying this complex logical expression.
                              Open

                                                  if (this.get("allowedextensions") && this.get("allowedextensions").length > 0) {
                                                      var browser_support = Info.isEdge() || Info.isChrome() || Info.isOpera() || (Info.isFirefox() && Info.firefoxVersion() >= 42) || (Info.isInternetExplorer() && Info.internetExplorerVersion() >= 10);
                                                      if (browser_support)
                                                          custom_accept_string = "." + this.get("allowedextensions").join(",.");
                                                  } else if (!this.get("allowcustomupload")) {
                              Severity: Critical
                              Found in src/dynamics/image_capture/chooser/chooser.js - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                                    if (this.get("allowedextensions") && this.get("allowedextensions").length > 0) {
                                                        var browser_support = Info.isEdge() || Info.isChrome() || Info.isOpera() || (Info.isFirefox() && Info.firefoxVersion() >= 42) || (Info.isInternetExplorer() && Info.internetExplorerVersion() >= 10);
                                                        if (browser_support)
                                                            custom_accept_string = "." + this.get("allowedextensions").join(",.");
                                                    } else if (!this.get("allowcustomupload")) {
                                Severity: Critical
                                Found in src/dynamics/video_recorder/chooser/chooser.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if (this.get("allowedextensions") && this.get("allowedextensions").length > 0) {
                                                          var browser_support = Info.isEdge() || Info.isChrome() || Info.isOpera() || (Info.isFirefox() && Info.firefoxVersion() >= 42) || (Info.isInternetExplorer() && Info.internetExplorerVersion() >= 10);
                                                          if (browser_support)
                                                              custom_accept_string = "." + this.get("allowedextensions").join(",.");
                                                      } else if (!this.get("allowcustomupload")) {
                                  Severity: Critical
                                  Found in src/dynamics/audio_recorder/chooser/chooser.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                        if (tooltipCollection && typeof tooltipCollection.get === "function") {
                                                            this.set("closeable", tooltipCollection.get("closeable") || false);
                                                            this.set("position", tooltipCollection.get("position") || 'top-right');
                                                            this.set("disappearafterinitial", (tooltipCollection.get("disappearafterseconds") || 2) * 1000);
                                                            this.set("disappearafter", this.get("disappearafterinitial"));
                                    Severity: Critical
                                    Found in src/dynamics/video_player/tootip/tooltip.js - About 1 hr to fix

                                      Function _onStart has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                      _onStart: function(ev) {
                                                          this.set("playing", true);
                                                          this.set("currenttime", 0);
                                                          this.set("remaining", this.get("duration"));
                                                          this.set("showactionbuttons", false);
                                      Severity: Minor
                                      Found in src/dynamics/ads_player/ads_player.js - About 1 hr to fix

                                        Function create has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                        create: function() {
                                                            if (this.get("theme")) this.set("theme", this.get("theme").toLowerCase());
                                                            if (this.get("theme") in Assets.imageviewerthemes) {
                                                                Objs.iter(Assets.imageviewerthemes[this.get("theme")], function(value, key) {
                                                                    if (!this.isArgumentAttr(key))
                                        Severity: Minor
                                        Found in src/dynamics/image_viewer/viewer/image_viewer.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language