betajs/betajs-media-components

View on GitHub

Showing 162 of 10,521 total issues

Function adsinitialized:playing,adtagurl,inlinevastxml has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                    "adsinitialized:playing,adtagurl,inlinevastxml": function(playing, adsTagURL, inlineVastXML) {
                        if (this.get("adsinitialized")) {
                            if (this.__adInitilizeChecker) this.__adInitilizeChecker.clear();
                            return true;
                        }
Severity: Minor
Found in src/dynamics/video_player/player/player.js - About 1 hr to fix

    Function __generateCompanionAdContent has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    __generateCompanionAdContent: function(companionads) {
                        companionads = companionads || this.get("companionads");
                        if (companionads && companionads.length > 0) {
                            const isMobile = this.get("mobileviewport");
                            if (
    Severity: Minor
    Found in src/dynamics/video_player/sidebar/sidebar.js - About 1 hr to fix

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

              _started: function() {
                  if (!this.dyn.isFormatSupported() || !this.dyn.get("allowtrim") || this.dyn.get("duration") < this.dyn.get("timeminlimit")) {
                      if (!this.dyn.isFormatSupported()) {
                          this.dyn.set("allowtrim", false);
                          this.dyn.set("was_allowtrim", true);
      Severity: Minor
      Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

        Function stop has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                stop: function() {
                    var minlimit = this.dyn.get("timeminlimit");
                    if (minlimit) {
                        var delta = (Time.now() - this._startTime - this.__pauseDelta) / 1000;
                        if (delta < minlimit) {
        Severity: Minor
        Found in src/dynamics/audio_recorder/recorder/states.js - About 1 hr to fix

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

                  _started: function() {
                      this.dyn.set("settingsvisible", false);
                      this.dyn.set("recordvisible", false);
                      this.dyn.set("rerecordvisible", false);
                      this.dyn.set("stopvisible", false);
          Severity: Minor
          Found in src/dynamics/image_capture/capture/states.js - About 1 hr to fix

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

                    _started: function() {
                        this.dyn.set("is_initial_state", true);
                        this.dyn.set("verified", false);
                        this.dyn.set("playbacksource", null);
                        this.dyn.set("playbackposter", null);
            Severity: Minor
            Found in src/dynamics/video_recorder/recorder/states.js - About 1 hr to fix

              Function _showBackgroundSnapshot has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              _showBackgroundSnapshot: function() {
                                  if (this.get("onlyaudio"))
                                      return;
                                  this._hideBackgroundSnapshot();
                                  if (this.get("snapshots") && this.get("selectfirstcovershotonskip")) {
              Severity: Minor
              Found in src/dynamics/video_recorder/recorder/recorder.js - About 1 hr to fix

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

                        _started: function() {
                            this.dyn.set("loadlabel", "");
                            this.dyn.trigger("verifying");
                            this.dyn.set("message", this.dyn.string("verifying") + "...");
                            this.dyn.set("playertopmessage", this.dyn.get("message"));
                Severity: Minor
                Found in src/dynamics/audio_recorder/recorder/states.js - About 1 hr to fix

                  Function _setIMASettings has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              _setIMASettings: function(options) {
                                  const settings = options.IMASettings;
                                  // google.ima.ImaSdkSettings.VpaidMode.DISABLED
                                  // DISABLED == 0 - VPAID ads will not play, and an error will be returned.
                                  // ENABLED == 1 - VPAID ads are enabled using a cross-domain iframe
                  Severity: Minor
                  Found in src/ads/ima/manager.js - About 1 hr to fix

                    Function __unmuteOnClick has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    __unmuteOnClick: function() {
                                        clearTimeout(this.get('clearDebounce'));
                                        const clearDebounce = setTimeout(function() {
                                            if (!this.get("muted") && this.get("volume") > 0) {
                                                return this.set("unmuteonclick", false);
                    Severity: Minor
                    Found in src/dynamics/video_player/player/player.js - About 1 hr to fix

                      Function _bindMedia has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      _bindMedia: function() {
                                          if (this._bound || !this.recorderAttached() || !this.recorder)
                                              return;
                                          this.recorder.ready.success(function() {
                                              this.recorder.on("require_display", function() {
                      Severity: Minor
                      Found in src/dynamics/image_capture/capture/capture.js - About 1 hr to fix

                        Function startUpdateVolume has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                            startUpdateVolume: function(args, element) {
                                                var event = args[0];
                                                var moveEvent = event.type === "mousedown" ? "mousemove" : "touchmove";
                                                var stopEvent = event.type === "mousedown" ? "mouseup" : "touchend";
                                                var domRect = element.getBoundingClientRect();
                        Severity: Minor
                        Found in src/dynamics/video_player/controlbar/controlbar.js - About 1 hr to fix

                          Function loadImageSnapshot has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          loadImageSnapshot: function(image, snapshotindex) {
                                              if (image.snapshotDisplay) {
                                                  if (this.parent().recorder)
                                                      this.parent().recorder.removeSnapshotDisplay(image.snapshotDisplay);
                                                  else
                          Severity: Minor
                          Found in src/dynamics/video_recorder/imagegallery/imagegallery.js - About 1 hr to fix

                            Function startUpdateVolume has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                                startUpdateVolume: function(args, element) { // TODO this was copied from the video player, should refactor to keep it DRY
                                                    var event = args[0];
                                                    var moveEvent = event.type === "mousedown" ? "mousemove" : "touchmove";
                                                    var stopEvent = event.type === "mousedown" ? "mouseup" : "touchend";
                                                    var domRect = element.getBoundingClientRect();
                            Severity: Minor
                            Found in src/dynamics/ads_player/ads_controlbar/ads_controlbar.js - About 1 hr to fix

                              Function fitFrameViewOnScreenVideo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          fitFrameViewOnScreenVideo: function() {
                              
                                              // It will be accessible when at least one of the
                                              // EventListeners will be fired
                                              var vts = this.recorder._recorder._videoTrackSettings;
                              Severity: Minor
                              Found in src/dynamics/_common/helperframe.js - About 1 hr to fix

                                Function setNextOutstreamAdTagURL has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                                setNextOutstreamAdTagURL: function(immediate, stateContext, nextState) {
                                                    immediate = immediate || false;
                                                    // if we have set nextadtagurls, then we will try to load next adtagurl
                                                    this.getNextOutstreamAdTagURLs(immediate)
                                                        .success(function(response) {
                                Severity: Minor
                                Found in src/dynamics/video_player/player/player.js - About 1 hr to fix

                                  Function initSidebarGallery has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                  initSidebarGallery: function() {
                                                      this.set("states.gallerysidebar", this.get("gallerysidebar"));
                                                      if (this.get("adsplaying")) return;
                                                      this.__sidebarGalleryInited = true;
                                  
                                  
                                  Severity: Minor
                                  Found in src/dynamics/video_player/sidebar/sidebar.js - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                            if (!window.requestAnimationFrame) {
                                                                window.requestAnimationFrame = (function() {
                                                                    return window.webkitRequestAnimationFrame ||
                                                                        window.mozRequestAnimationFrame ||
                                                                        window.oRequestAnimationFrame ||
                                    Severity: Major
                                    Found in src/dynamics/_common/audio_visualization.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                              if (
                                                                  (this.get("floatingoptions.desktop.companionad") && !isMobile) ||
                                                                  (this.get("floatingoptions.mobile.companionad") && isMobile) ||
                                                                  (this.get("gallerysidebar") && this.get("sidebaroptions.showcompanionad") && !isMobile)
                                                              ) {
                                      Severity: Major
                                      Found in src/dynamics/video_player/sidebar/sidebar.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                    if (item < 100 && item > 0) {
                                                                                        this.get("midrollads").push({
                                                                                            position: parseFloat((item / 100).toFixed(2))
                                                                                        });
                                                                                    }
                                        Severity: Major
                                        Found in src/dynamics/video_player/player/player.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language