betajs/betajs-media-components

View on GitHub

Showing 162 of 10,521 total issues

Function _renderCompanionAd has 109 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                _renderCompanionAd: function(ad, options) {
                    // Do not render anything if options is boolean and false
                    if (Types.is_boolean(options) && !Boolean(options)) return;

                    ad = ad || this.get("ad");
Severity: Major
Found in src/dynamics/ads_player/ads_player.js - About 4 hrs to fix

    Function __buildOutsourceElement has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    __buildOutsourceElement: function(element, options, isCamera, choosenDevice) {
                        var self = this;
                        var deviceCollections = isCamera ? this.get("cameras") : this.get("microphones");
                        var listeners = [];
                        var initialSelectorText = '';
    Severity: Major
    Found in src/dynamics/video_recorder/recorder/recorder.js - About 4 hrs to fix

      Function _attachAudio has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      _attachAudio: function() {
                          if (this.audioAttached())
                              return;
                          if (!this.__activated) {
                              this.__attachRequested = true;
      Severity: Major
      Found in src/dynamics/audio_player/player/player.js - About 4 hrs to fix

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

                        create: function() {
                            this._validateParameters();
                            // Init Audio Context
                            WebRTCSupport.globals();
                            this.set("optionsinitialstate", {
        Severity: Major
        Found in src/dynamics/video_recorder/recorder/recorder.js - About 3 hrs to fix

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

                  _started: function() {
                      this.dyn.set("cancancel", true);
                      this.dyn.set("skipinitial", this.dyn.get("skipinitial") || this.dyn.get("skipinitialonrerecord"));
                      this.dyn.set("settingsvisible", false);
                      this.dyn.set("recordvisible", false);
          Severity: Major
          Found in src/dynamics/video_recorder/recorder/states.js - About 3 hrs to fix

            Function _timerFire has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            _timerFire: function() {
                                if (this.destroyed())
                                    return;
                                this.set("currentorientation", window.innerHeight > window.innerWidth ? "portrait" : "landscape");
                                try {
            Severity: Major
            Found in src/dynamics/video_recorder/recorder/recorder.js - About 3 hrs to fix

              Function selectUpload has 83 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      selectUpload: function(file) {
                          if (this.dyn.get("popup")) {
                              this._popup();
                              return;
                          }
              Severity: Major
              Found in src/dynamics/video_recorder/recorder/states.js - About 3 hrs to fix

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

                            create: function() {
                                var _interactionEvent;
                                var _frameClicksCount = 0;
                                this.__parent = this.parent();
                                this.__initialSettings = {
                Severity: Major
                Found in src/dynamics/_common/helperframe.js - About 3 hrs to fix

                  Function __testAutoplayOptions has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  __testAutoplayOptions: function(video) {
                                      var suitableCondition = false;
                                      var autoplayPossibleOptions = [{
                                              muted: true,
                                              playsinline: false
                  Severity: Major
                  Found in src/dynamics/video_player/player/player.js - About 3 hrs to fix

                    Function __controlAdRolls has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    __controlAdRolls: function() {
                                        // If we have mid-rolls, then prepare mid-Rolls
                                        if (
                                            this.get("midrollads").length > 0 && this.get("duration") > 0.0 && !this._adsRollPositionsCollection
                                        ) {
                    Severity: Major
                    Found in src/dynamics/video_player/player/player.js - About 2 hrs to fix

                      File helperframe.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      Scoped.define("module:Common.Dynamics.Helperframe", [
                          "dynamics:Dynamic",
                          "base:Async",
                          "base:Timers.Timer",
                          "base:Objs",
                      Severity: Minor
                      Found in src/dynamics/_common/helperframe.js - About 2 hrs to fix

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

                                        create: function() {
                                            var custom_accept_string = "";
                                            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)
                        Severity: Major
                        Found in src/dynamics/video_recorder/chooser/chooser.js - About 2 hrs to fix

                          Function playercontainerstyles:show_sidebar,gallerysidebar,sidebaroptions.presetwidth,fullscreened,videowidth,is_floating has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                              "playercontainerstyles:show_sidebar,gallerysidebar,sidebaroptions.presetwidth,fullscreened,videowidth,is_floating": function(showSidebar, gallerySidebar, sidebarPresetWidth, fullscreened, videoWidth, isFloating) {
                                                  let width, styles;
                                                  // before setting any computed to sidebar width, we set a default max-width value based on showSidebar, gallerySidebar and isFloating states.
                                                  const defaultMaxWidthSB = (showSidebar && gallerySidebar && !isFloating) ? '30%' : '50%';
                                                  this.set("sidebarstyles", {
                          Severity: Major
                          Found in src/dynamics/video_player/player/player.js - About 2 hrs to fix

                            Function __calculateFloatingDimensions has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                            __calculateFloatingDimensions: function() {
                                                var height, width, playerWidth, position, viewportOptions, response = {};
                                                var aspectRatio = typeof this.get("aspect_ratio") === "string" ? this.get("aspect_ratio").split("/") : 1.77;
                                                // Adding condition: "|| Info.isMobile()" will be always true/false as it's getting data from the userAgent and at once;
                                                var isMobile = this.__isInMobileViewport();
                            Severity: Major
                            Found in src/dynamics/video_player/player/player.js - About 2 hrs 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

                                Consider simplifying this complex logical expression.
                                Open

                                                    if ((data.width && this.dyn.get("minuploadingwidth") && this.dyn.get("minuploadingwidth") > data.width) ||
                                                        (data.width && this.dyn.get("maxuploadingwidth") && this.dyn.get("maxuploadingwidth") < data.width) ||
                                                        (data.height && this.dyn.get("minuploadingheight") && this.dyn.get("minuploadingheight") > data.height) ||
                                                        (data.height && this.dyn.get("maxuploadingheight") && this.dyn.get("maxuploadingheight") < data.height)) {
                                                        this.next("FatalError", {
                                Severity: Critical
                                Found in src/dynamics/video_recorder/recorder/states.js - About 2 hrs to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if ((data.width && this.dyn.get("minuploadingwidth") && this.dyn.get("minuploadingwidth") > data.width) ||
                                                          (data.width && this.dyn.get("maxuploadingwidth") && this.dyn.get("maxuploadingwidth") < data.width) ||
                                                          (data.height && this.dyn.get("minuploadingheight") && this.dyn.get("minuploadingheight") > data.height) ||
                                                          (data.height && this.dyn.get("maxuploadingheight") && this.dyn.get("maxuploadingheight") < data.height)) {
                                                          this.next("FatalError", {
                                  Severity: Critical
                                  Found in src/dynamics/image_capture/capture/states.js - About 2 hrs to fix

                                    Function _recomputeImageBox has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                    _recomputeImageBox: function(image) {
                                                        if (!this.parent().recorder && this.get("snapshots").length < 1)
                                                            return;
                                                        // Will fix portrait covershot bug, will not show stretched box
                                                        var _maxHeight,
                                    Severity: Major
                                    Found in src/dynamics/video_recorder/imagegallery/imagegallery.js - About 2 hrs to fix

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

                                              _started: function() {
                                                  this.dyn.set("cancancel", true);
                                                  this.dyn.set("skipinitial", this.dyn.get("skipinitial") || this.dyn.get("skipinitialonrerecord"));
                                                  this.dyn.set("settingsvisible", false);
                                                  this.dyn.set("recordvisible", false);
                                      Severity: Major
                                      Found in src/dynamics/audio_recorder/recorder/states.js - About 2 hrs to fix

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

                                                _started: function() {
                                                    this.dyn.set("cancancel", true);
                                                    this.dyn.set("skipinitial", this.dyn.get("skipinitial") || this.dyn.get("skipinitialonrerecord"));
                                                    this.dyn.set("settingsvisible", false);
                                                    this.dyn.set("recordvisible", false);
                                        Severity: Major
                                        Found in src/dynamics/image_capture/capture/states.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language