Showing 162 of 10,521 total issues
Function _renderCompanionAd
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
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");
Function __buildOutsourceElement
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__buildOutsourceElement: function(element, options, isCamera, choosenDevice) {
var self = this;
var deviceCollections = isCamera ? this.get("cameras") : this.get("microphones");
var listeners = [];
var initialSelectorText = '';
Function _attachAudio
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_attachAudio: function() {
if (this.audioAttached())
return;
if (!this.__activated) {
this.__attachRequested = true;
Function create
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create: function() {
this._validateParameters();
// Init Audio Context
WebRTCSupport.globals();
this.set("optionsinitialstate", {
Function _started
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Function _timerFire
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_timerFire: function() {
if (this.destroyed())
return;
this.set("currentorientation", window.innerHeight > window.innerWidth ? "portrait" : "landscape");
try {
Function selectUpload
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
selectUpload: function(file) {
if (this.dyn.get("popup")) {
this._popup();
return;
}
Function create
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create: function() {
var _interactionEvent;
var _frameClicksCount = 0;
this.__parent = this.parent();
this.__initialSettings = {
Function __testAutoplayOptions
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__testAutoplayOptions: function(video) {
var suitableCondition = false;
var autoplayPossibleOptions = [{
muted: true,
playsinline: false
Function __controlAdRolls
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
) {
File helperframe.js
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
Scoped.define("module:Common.Dynamics.Helperframe", [
"dynamics:Dynamic",
"base:Async",
"base:Timers.Timer",
"base:Objs",
Function create
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)
Function playercontainerstyles:show_sidebar,gallerysidebar,sidebaroptions.presetwidth,fullscreened,videowidth,is_floating
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
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", {
Function __calculateFloatingDimensions
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
Function uploadTextTrackFile
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
uploadTextTrackFile: function(file, locale) {
var _dynamics, _uploader, _initialTracks, _counter;
_dynamics = this.dyn.parent();
// Check either recorder or player dynamics
Consider simplifying this complex logical expression. Open
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", {
Consider simplifying this complex logical expression. Open
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", {
Function _recomputeImageBox
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
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,
Function _started
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Function _started
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);