betajs/betajs-media-components

View on GitHub

Showing 10,517 of 10,517 total issues

File player.js has 2802 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:VideoPlayer.Dynamics.Player", [
    "dynamics:Dynamic",
    "module:Assets",
    "module:DatasetProperties",
    "module:FloatHandler",
Severity: Major
Found in src/dynamics/video_player/player/player.js - About 1 wk to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    Scoped.define("module:VideoRecorder.Dynamics.RecorderStates.RecordPrepare", [
        "module:VideoRecorder.Dynamics.RecorderStates.State",
        "base:Timers.Timer",
        "base:Time"
    ], function(State, Timer, Time, scoped) {
    Severity: Major
    Found in src/dynamics/video_recorder/recorder/states.js and 1 other location - About 4 days to fix
    src/dynamics/audio_recorder/recorder/states.js on lines 426..504

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 779.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    Scoped.define("module:AudioRecorder.Dynamics.RecorderStates.RecordPrepare", [
        "module:AudioRecorder.Dynamics.RecorderStates.State",
        "base:Timers.Timer",
        "base:Time"
    ], function(State, Timer, Time, scoped) {
    Severity: Major
    Found in src/dynamics/audio_recorder/recorder/states.js and 1 other location - About 4 days to fix
    src/dynamics/video_recorder/recorder/states.js on lines 825..903

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 779.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File recorder.js has 1407 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    Scoped.define("module:VideoRecorder.Dynamics.Recorder", [
        "dynamics:Dynamic",
        "module:Assets",
        "module:StylesMixin",
        "browser:Info",
    Severity: Major
    Found in src/dynamics/video_recorder/recorder/recorder.js - About 3 days to fix

      File states.js has 1347 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      Scoped.define("module:VideoRecorder.Dynamics.RecorderStates.State", [
          "base:States.State",
          "base:Events.ListenMixin",
          "base:Objs"
      ], function(State, ListenMixin, Objs, scoped) {
      Severity: Major
      Found in src/dynamics/video_recorder/recorder/states.js - About 3 days to fix

        Similar blocks of code found in 2 locations. 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/audio_recorder/chooser/chooser.js and 1 other location - About 3 days to fix
        src/dynamics/image_capture/chooser/chooser.js on lines 37..85

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 568.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. 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/image_capture/chooser/chooser.js and 1 other location - About 3 days to fix
        src/dynamics/audio_recorder/chooser/chooser.js on lines 38..86

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 568.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        _findNextTabStop: function(parentElement, ev, callback, direction) {
                            var _currentIndex, _direction, _tabIndexes, _tabIndexesArray, _maxIndex, _minIndex, _looked, _tabIndex, _delta, _element, _videoPlayersCount;
                            _maxIndex = _minIndex = 0;
                            _direction = direction || 1;
                            _element = ev.target;
        Severity: Major
        Found in src/dynamics/video_player/player/player.js and 1 other location - About 3 days to fix
        src/dynamics/audio_player/player/player.js on lines 450..493

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 547.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                        _findNextTabStop: function(parentElement, ev, callback, direction) {
                            var _currentIndex, _direction, _tabIndexes, _tabIndexesArray, _maxIndex, _minIndex, _looked, _tabIndex, _delta, _element, _audioPlayersCount;
                            _maxIndex = _minIndex = 0;
                            _direction = direction || 1;
                            _element = ev.target;
        Severity: Major
        Found in src/dynamics/audio_player/player/player.js and 1 other location - About 3 days to fix
        src/dynamics/video_player/player/player.js on lines 1917..1960

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 547.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    if (!(Info.isMobile() && Info.isAndroid() && Info.isCordova())) {
                        if (this.dyn.get("allowedextensions")) {
                            var filename = (file.files[0].name || "").toLowerCase();
                            var found = false;
                            this.dyn.get("allowedextensions").forEach(function(extension) {
        Severity: Major
        Found in src/dynamics/audio_recorder/recorder/states.js and 1 other location - About 2 days to fix
        src/dynamics/image_capture/capture/states.js on lines 169..200

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 506.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                    if (!(Info.isMobile() && Info.isAndroid() && Info.isCordova())) {
                        if (this.dyn.get("allowedextensions")) {
                            var filename = (file.files[0].name || "").toLowerCase();
                            var found = false;
                            this.dyn.get("allowedextensions").forEach(function(extension) {
        Severity: Major
        Found in src/dynamics/image_capture/capture/states.js and 1 other location - About 2 days to fix
        src/dynamics/audio_recorder/recorder/states.js on lines 165..196

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 506.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function exports has 483 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(grunt) {
        
            var pkg = grunt.file.readJSON('package.json');
            var gruntHelper = require('betajs-compile');
            var dist = 'betajs-media-components';
        Severity: Major
        Found in Gruntfile.js - About 2 days to fix

          File states.js has 839 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          Scoped.define("module:VideoPlayer.Dynamics.PlayerStates.State", [
              "base:States.State",
              "base:Events.ListenMixin",
              "base:Objs"
          ], function(State, ListenMixin, Objs, scoped) {
          Severity: Major
          Found in src/dynamics/video_player/player/states.js - About 2 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            Scoped.define("module:AudioRecorder.Dynamics.RecorderStates.Initial", [
                "module:AudioRecorder.Dynamics.RecorderStates.State"
            ], function(State, scoped) {
                return State.extend({
                    scoped: scoped
            Severity: Major
            Found in src/dynamics/audio_recorder/recorder/states.js and 1 other location - About 1 day to fix
            src/dynamics/image_capture/capture/states.js on lines 71..104

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 337.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            Scoped.define("module:ImageCapture.Dynamics.RecorderStates.Initial", [
                "module:ImageCapture.Dynamics.RecorderStates.State"
            ], function(State, scoped) {
                return State.extend({
                    scoped: scoped
            Severity: Major
            Found in src/dynamics/image_capture/capture/states.js and 1 other location - About 1 day to fix
            src/dynamics/audio_recorder/recorder/states.js on lines 81..114

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 337.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                tab_index_move: function(ev, nextSelector, focusingSelector) {
                                    var _targetElement, _activeElement, _selector, _keyCode;
                                    _keyCode = ev.which || ev.keyCode;
                                    _activeElement = this.activeElement();
                                    if (_keyCode === 13 || _keyCode === 32) {
            Severity: Major
            Found in src/dynamics/image_viewer/viewer/image_viewer.js and 1 other location - About 1 day to fix
            src/dynamics/audio_player/player/player.js on lines 565..602

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 337.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                                tab_index_move: function(ev, nextSelector, focusingSelector) {
                                    var _targetElement, _activeElement, _selector, _keyCode;
                                    _keyCode = ev.which || ev.keyCode;
                                    _activeElement = this.activeElement();
                                    if (_keyCode === 13 || _keyCode === 32) {
            Severity: Major
            Found in src/dynamics/audio_player/player/player.js and 1 other location - About 1 day to fix
            src/dynamics/image_viewer/viewer/image_viewer.js on lines 276..313

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 337.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            Scoped.define("module:AudioRecorder.Dynamics.RecorderStates.RequiredSoftwareWait", [
                "module:AudioRecorder.Dynamics.RecorderStates.State",
                "base:Promise",
                "browser:Dom"
            ], function(State, Promise, Dom, scoped) {
            Severity: Major
            Found in src/dynamics/audio_recorder/recorder/states.js and 1 other location - About 1 day to fix
            src/dynamics/image_capture/capture/states.js on lines 288..322

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 326.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            Scoped.define("module:ImageCapture.Dynamics.RecorderStates.RequiredSoftwareWait", [
                "module:ImageCapture.Dynamics.RecorderStates.State",
                "base:Promise",
                "browser:Dom"
            ], function(State, Promise, Dom, scoped) {
            Severity: Major
            Found in src/dynamics/image_capture/capture/states.js and 1 other location - About 1 day to fix
            src/dynamics/audio_recorder/recorder/states.js on lines 306..340

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 326.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            File ads_player.js has 706 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            Scoped.define("module:Ads.Dynamics.Player", [
                "base:Objs",
                "browser:Info",
                "base:Maths",
                "base:Types",
            Severity: Major
            Found in src/dynamics/ads_player/ads_player.js - About 1 day to fix
              Severity
              Category
              Status
              Source
              Language