betajs/betajs-media

View on GitHub

Showing 92 of 167 total issues

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

            __calculateVideoTrackSettings: function(sourceVideoSettings, videoElement, setInitialSettings) {
                videoElement = videoElement || this._video;
                var _lookedWidth, _lookedHeight, _slippedWidth, _slippedHeight, _dimensions;
                var _asR = sourceVideoSettings.aspectRatio || (sourceVideoSettings.width / sourceVideoSettings.height);
                if (!isNaN(_asR)) {
Severity: Minor
Found in src/webrtc/webrtc_recorder.js - About 1 hr to fix

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

                _wsOnMessage: function(evt) {
                    var data = JSON.parse(evt.data);
                    var status = parseInt(data.status, 10);
                    var command = data.command;
                    if (status !== 200) {
    Severity: Minor
    Found in src/webrtc/peer_recorder.js - About 1 hr to fix

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

              createSnapshotFromSource: function(videoSource, type, time, isUploader, h, w, x, y, quality) {
                  var promise = Promise.create();
                  var video = document.createElement("video");
                  video.src = videoSource;
      
      
      Severity: Minor
      Found in src/video_recorder/recorder_support.js - About 1 hr to fix

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

                elementFileInfo: function(elementType, elementEvent, elementAttrs, file) {
                    try {
                        var element = document.createElement(elementType);
                        Objs.iter(elementAttrs, function(value, key) {
                            element[key] = value;
        Severity: Minor
        Found in src/video_player/player_support.js - About 1 hr to fix

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

                  waveChannelTransform: function(dumpedInputBuffer, volume, schedulable, schedulableCtx) {
                      var promise = Promise.create();
                      var volumeFactor = 0x7FFF * (volume || 1);
                      var offset = dumpedInputBuffer.offset;
                      var endOffset = dumpedInputBuffer.endOffset;
          Severity: Minor
          Found in src/encoding/wave_encoder.js - About 1 hr to fix

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

                        constructor: function(options) {
                            inherited.constructor.call(this, options);
                            this._video = options.video;
                            this._localPlaybackRequested = options.localPlaybackRequested;
                            this._recording = false;
            Severity: Minor
            Found in src/webrtc/webrtc_recorder.js - About 1 hr to fix

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

                          _googleCastPlayerErrorMessages: function(error) {
                              switch (error.code) {
                                  case chrome.cast.ErrorCode.API_NOT_INITIALIZED:
                                      return 'The API is not initialized.' +
                                          (error.description ? ' :' + error.description : '');
              Severity: Minor
              Found in src/video_player/broadcasting.js - About 1 hr to fix

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

                        bindStreamToVideo: function(stream, video, flip) {
                            if (!video)
                                video = document.createElement("video");
                            video.volume = 0;
                            video.muted = true;
                Severity: Minor
                Found in src/webrtc/webrtc_support.js - About 1 hr to fix

                  Function createSnapshot has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          createSnapshot: function(type, video, isUploader, h, w, x, y, quality) {
                  Severity: Major
                  Found in src/video_recorder/recorder_support.js - About 1 hr to fix

                    Function _createSnapshot has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            _createSnapshot: function(type, video, isUploader, h, w, x, y, quality) {
                    Severity: Major
                    Found in src/video_recorder/recorder_support.js - About 1 hr to fix

                      Function createSnapshotDisplay has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                                  createSnapshotDisplay: function(parent, snapshot, x, y, w, h) {},
                      Severity: Minor
                      Found in src/video_recorder/video_recorder.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if (options.video.width)
                                                options.video.height = Math.round(options.video.width / options.video.aspectRatio);
                                            else if (options.video.height)
                                                options.video.width = Math.round(options.video.height * options.video.aspectRatio);
                        Severity: Major
                        Found in src/webrtc/webrtc_support.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (e.name !== "ConstraintNotSatisfiedError" && e.name !== "OverconstrainedError")
                                                      return e;
                          Severity: Major
                          Found in src/webrtc/webrtc_support.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (typeof this._videoTrackSettings.videoInnerFrame === 'undefined')
                                                                this._videoTrackSettings = Objs.extend(sourceVideoSettings, this._videoTrackSettings);
                            Severity: Major
                            Found in src/webrtc/webrtc_recorder.js - About 45 mins to fix

                              Function updateSnapshotDisplay has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      updateSnapshotDisplay: function(snapshot, image, x, y, w, h) {
                              Severity: Minor
                              Found in src/video_recorder/recorder_support.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                if (isVideo)
                                                                    this._currentVideo = Objs.ithKey(devices);
                                                                else
                                                                    this._currentAudio = Objs.ithKey(devices);
                                Severity: Major
                                Found in src/video_recorder/video_recorder.js - About 45 mins to fix

                                  Function createSnapshotDisplay has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                              createSnapshotDisplay: function(parent, snapshot, x, y, w, h) {},
                                  Severity: Minor
                                  Found in src/image_recorder/image_recorder.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (!navigator.mediaDevices || !navigator.mediaDevices.getSupportedConstraints || !navigator.mediaDevices.getSupportedConstraints().mediaSource)
                                                            return Promise.error("This browser does not support screen recording.");
                                    Severity: Major
                                    Found in src/webrtc/webrtc_support.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                      if (as) {
                                                          if (typeof opts.video.mandatory !== 'undefined') {
                                                              opts.video.mandatory.minAspectRatio = as;
                                                              opts.video.mandatory.maxAspectRatio = as;
                                                          } else {
                                      Severity: Major
                                      Found in src/webrtc/webrtc_support.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                        if (Info.isAndroid()) {
                                                            opts.video = {};
                                                        } else {
                                                            opts.video = {
                                                                mandatory: {}
                                        Severity: Major
                                        Found in src/webrtc/webrtc_support.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language