betajs/betajs-media

View on GitHub

Showing 92 of 167 total issues

File webrtc_recorder.js has 958 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:WebRTC.RecorderWrapper", [
    "base:Classes.ConditionalInstance",
    "base:Events.EventsMixin",
    "base:Objs",
    "base:Async",
Severity: Major
Found in src/webrtc/webrtc_recorder.js - About 2 days to fix

    Function userMedia2 has 242 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            userMedia2: function(options) {
                var opts = {};
                var promise;
                if (options.audio)
                    opts.audio = options.audio;
    Severity: Major
    Found in src/webrtc/webrtc_support.js - About 1 day to fix

      File video_player.js has 524 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      Scoped.define("module:Player.VideoPlayerWrapper", [
          "base:Classes.OptimisticConditionalInstance",
          "base:Events.EventsMixin",
          "base:MediaTypes",
          "base:Types",
      Severity: Major
      Found in src/video_player/video_player.js - About 1 day to fix

        File webrtc_support.js has 516 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        Scoped.define("module:WebRTC.Support", [
            "base:Promise",
            "base:Objs",
            "browser:Info",
            "browser:Dom",
        Severity: Major
        Found in src/webrtc/webrtc_support.js - About 1 day to fix

          File video_recorder.js has 445 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          Scoped.define("module:Recorder.VideoRecorderWrapper", [
              "base:Classes.ConditionalInstance",
              "base:Events.EventsMixin",
              "base:Objs",
              "base:Promise"
          Severity: Minor
          Found in src/video_recorder/video_recorder.js - About 6 hrs to fix

            Function _initialize has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        _initialize: function() {
                            if (this._options.nohtml5)
                                return Promise.error(true);
                            if (this._sources.length < 1)
                                return Promise.error(true);
            Severity: Major
            Found in src/video_player/video_player.js - About 4 hrs to fix

              Function _initialize has 97 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          _initialize: function() {
                              if (this._options.nohtml5)
                                  return Promise.error(true);
                              if (this._sources.length < 1)
                                  return Promise.error(true);
              Severity: Major
              Found in src/audio_player/audio_player.js - About 3 hrs to fix

                Function generateEBMLHeader has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        generateEBMLHeader: function(duration, width, height) {
                
                            var doubleToString = function(num) {
                                return [].slice.call(
                                    new Uint8Array((new Float64Array([num])).buffer), 0).map(function(e) {
                Severity: Major
                Found in src/encoding/webm_encoder.js - About 3 hrs to fix

                  File audio_player.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  Scoped.define("module:AudioPlayer.AudioPlayerWrapper", [
                      "base:Classes.OptimisticConditionalInstance",
                      "base:Events.EventsMixin",
                      "base:Types",
                      "base:Objs",
                  Severity: Minor
                  Found in src/audio_player/audio_player.js - About 3 hrs to fix

                    Function reverseVideos has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                reverseVideos: function() {
                                    var _self = this;
                                    var _isMainBecomeSmall = this.__multiStreamVideoSettings.isMainStream;
                                    this.__multiStreamVideoSettings.isMainStream = !_isMainBecomeSmall;
                    
                    
                    Severity: Major
                    Found in src/webrtc/webrtc_recorder.js - About 2 hrs to fix

                      File broadcasting.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      Scoped.define("module:Player.Broadcasting", [
                          "base:Class",
                          "browser:Loader",
                          "browser:Events"
                      ], function(Class, Loader, DomEvents, scoped) {
                      Severity: Minor
                      Found in src/video_player/broadcasting.js - About 2 hrs to fix

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

                                    constructor: function(options, transitionals) {
                                        inherited.constructor.call(this);
                                        options = Objs.extend(Objs.clone(options || {}, 1), transitionals);
                                        this._poster = options.poster || null;
                                        var sources = options.source || options.sources || [];
                        Severity: Major
                        Found in src/video_player/video_player.js - About 2 hrs to fix

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

                                      constructor: function(stream, options) {
                                          options = options || {};
                                          inherited.constructor.call(this);
                                          this._stream = stream;
                                          this._started = false;
                          Severity: Major
                          Found in src/webrtc/media_recorder.js - About 2 hrs to fix

                            Function _startDrawRecorderToCanvas has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        _startDrawRecorderToCanvas: function(stream) {
                                            try {
                                                var streamSettings = stream.getVideoTracks()[0].getSettings();
                                                if (streamSettings.aspectRatio) {
                                                    if (Math.abs(streamSettings.aspectRatio - this._videoTrackSettings.aspectRatio) > 0.1) {
                            Severity: Major
                            Found in src/webrtc/webrtc_recorder.js - About 2 hrs to fix

                              File webm_encoder.js has 264 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              Scoped.define("module:Encoding.WebmEncoder.Support", [
                                  "base:Promise",
                                  "base:Scheduling.Helper",
                                  "base:Types"
                              ], function(Promise, SchedulingHelper, Types) {
                              Severity: Minor
                              Found in src/encoding/webm_encoder.js - About 2 hrs to fix

                                Function _initializeCastApi has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            _initializeCastApi: function() {
                                                var self = this;
                                                self.player.trigger("cast-available", true);
                                                var googleCastInitialOptions = this.googleCast.initialOptions;
                                
                                
                                Severity: Major
                                Found in src/video_player/broadcasting.js - About 2 hrs to fix

                                  Function _enhanceSDP has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              _enhanceSDP: function(sdpStr, enhanceData) {
                                                  var sdpLines = sdpStr.split(/\r\n/);
                                                  var sdpSection = 'header';
                                                  var hitMID = false;
                                                  var sdpStrRet = '';
                                  Severity: Major
                                  Found in src/webrtc/peer_recorder.js - About 2 hrs to fix

                                    Function _setup has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                _setup: function() {
                                                    this._loaded = false;
                                                    this._domEvents.on(this._element, "canplay", this._eventLoaded, this);
                                                    this._domEvents.on(this._element, "loadedmetadata", this._eventLoadedMetaData, this);
                                                    this._domEvents.on(this._element, "playing", this._eventPlaying, this);
                                    Severity: Major
                                    Found in src/video_player/video_player.js - About 2 hrs to fix

                                      Function _drawTracksToCanvas has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  _drawTracksToCanvas: function() {
                                                      if (!this._drawingStream)
                                                          return;
                                                      var videosCount = this._videoElements.length;
                                                      var reversed = false;
                                      Severity: Major
                                      Found in src/webrtc/webrtc_recorder.js - About 2 hrs to fix

                                        Function _setupCastRemotePlayer has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    _setupCastRemotePlayer: function(castRemotePlayer, castRemotePlayerController) {
                                                        var self = this;
                                                        var player = this.player;
                                                        var options = this.castOptions;
                                                        var sources = player._sources;
                                        Severity: Major
                                        Found in src/video_player/broadcasting.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language