betajs/betajs-media-components

View on GitHub

Showing 162 of 10,521 total issues

Function containerSizingStyles:aspectratio,nativeRecordingWidth,nativeRecordingHeight,activated, height, width has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

                    "containerSizingStyles:aspectratio,nativeRecordingWidth,nativeRecordingHeight,activated, height, width": function(aspectRatio, fallbackWidth, fallbackHeight, active, height, width) {
Severity: Minor
Found in src/dynamics/video_recorder/recorder/recorder.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        if (snap) {
                                            if (!this.get('videometadata').height && typeof Image !== 'undefined' && this.get("createthumbnails")) {
                                                RecorderSupport.snapshotMetaData(snap).success(function(data) {
                                                    var _thumbWidth = data.orientation === 'landscape' ? 80 : 35;
                                                    this.set("videometadata", Objs.tree_merge(this.get("videometadata"), data));
    Severity: Major
    Found in src/dynamics/video_recorder/recorder/recorder.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                          if (sidebarWidth && sidebarWidth > 0) {
                                              // if sidebar non-fluid, we will calculate based on preferred ar or first video we're getting
                                              if (!this.get('sidebaroptions.fluid')) {
                                                  this.set("sidebaroptions.presetwidth", sidebarWidth + "px");
                                              }
      Severity: Major
      Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                                if (Types.is_object(presets.mobile) && presets.mobile[k]) {
                                                    this.set(`initialoptions.mobilepresets.${k}`, presets.mobile[k]);
                                                    if (isMobileView) this.set(k, presets.mobile[k]);
                                                }
        Severity: Major
        Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

          Function hideplayer:autoplay,autoplaywhenvisible,adshassource,adsinitialized,hidden,hidebeforeadstarts has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                                  autoplay,
                                  autoplaywhenvisible,
                                  adshassource,
                                  adsinitialized,
                                  hidden,
          Severity: Minor
          Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                            if (this.get("infiniteduration"))
                                                                step = 100;
            Severity: Major
            Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                      if (!value) {
                                                          this.get("settings")[index].value = !this.get("settings")[index].value;
                                                      }
              Severity: Major
              Found in src/dynamics/_common/settings_menu/settings_menu.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if (this.dyn && this.dyn.player) this.dyn.player.play();
                Severity: Major
                Found in src/dynamics/video_player/player/states.js - About 45 mins to fix

                  Function playercontainerstyles:show_sidebar,gallerysidebar,sidebaroptions.presetwidth,fullscreened,videowidth,is_floating has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                                      "playercontainerstyles:show_sidebar,gallerysidebar,sidebaroptions.presetwidth,fullscreened,videowidth,is_floating": function(showSidebar, gallerySidebar, sidebarPresetWidth, fullscreened, videoWidth, isFloating) {
                  Severity: Minor
                  Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                        if (typeof _ar === "number") {
                                                            sidebarWidth = playerContainerWidthInNumber - (playerContainerHeightInNumber * _ar);
                                                        }
                    Severity: Major
                    Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                              if (_dyn.get("thumbcuelist")[i]) {
                                                                  var _cue = _dyn.get("thumbcuelist")[i];
                                                                  if (_cue.startTime < onDuration && _cue.endTime > onDuration) {
                                                                      _trackTags.showDurationThumb(i, clientX, onDuration);
                                                                      break;
                      Severity: Major
                      Found in src/dynamics/video_player/controlbar/controlbar.js - About 45 mins to fix

                        Function show_sidebar:outstream,hide_sidebar,is_floating,with_sidebar,fullscreened,mobileviewport has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                                outstream, hideSidebar, isFloating, withSidebar, fullscreened, mobileViewport
                        Severity: Minor
                        Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                                          if (duration > item) {
                                                                              for (var i = 1; i <= step; i++) {
                                                                                  this.get("midrollads").push({
                                                                                      position: this.get("position") + i * item
                                                                                  });
                          Severity: Major
                          Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if (Types.is_string(_ar)) {
                                                                    if (_ar.includes("/"))
                                                                        _ar = parseFloat(_ar.split("/").reduce((a, b) => a / b));
                                                                    else if (_ar.includes(":"))
                                                                        _ar = parseFloat(_ar.split(":").reduce((a, b) => a / b));
                            Severity: Major
                            Found in src/dynamics/video_player/player/player.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                              if (uiElements.length >= 0) {
                                                                  adsRenderingSettings[setting] = uiElements;
                                                              }
                              Severity: Major
                              Found in src/ads/ima/manager.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if (this.__dyn.__listeningOnPlayNext) {
                                                                        this.__dyn.trigger("play_next");
                                                                    } else {
                                                                        // TODO: need to be improved, this part runs only if first video from the playlist has error
                                                                        this.__dyn.setAll({
                                Severity: Major
                                Found in src/dynamics/video_player/sidebar/sidebar.js - About 45 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                          if (active && (Info.isInternetExplorer() || (Info.isSafari() && Info.safariVersion() < 15))) {
                                                              new ResizeObserver(function(entries) {
                                                                  this.set("height", Math.floor(entries[0].target.offsetWidth / (aspectRatio || (fallbackWidth / fallbackHeight))));
                                                              }.bind(this)).observe(this.activeElement().parentElement);
                                                              result.height = Math.floor(this.activeElement().parentElement.offsetWidth / (aspectRatio || (fallbackWidth / fallbackHeight))) + "px";
                                  Severity: Major
                                  Found in src/dynamics/video_recorder/recorder/recorder.js - About 40 mins to fix

                                    Function __appendTextTrackTags has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                                __appendTextTrackTags: function(subtitle, index, trackTag, flag, domEvent) {
                                    Severity: Minor
                                    Found in src/dynamics/_common/track_tags.js - About 35 mins to fix

                                      Function _drawFrame has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                                      _drawFrame: function(video, currentTime, width, height, cb) {
                                      Severity: Minor
                                      Found in src/dynamics/video_player/player/player.js - About 35 mins to fix

                                        Function __drawCompanionAdToContainer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                                        __drawCompanionAdToContainer: function(container, companionAd, dimensions, ar, _ar) {
                                        Severity: Minor
                                        Found in src/dynamics/video_player/sidebar/sidebar.js - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language