Showing 92 of 167 total issues
Function __calculateVideoTrackSettings
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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)) {
Function _wsOnMessage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_wsOnMessage: function(evt) {
var data = JSON.parse(evt.data);
var status = parseInt(data.status, 10);
var command = data.command;
if (status !== 200) {
Function createSnapshotFromSource
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createSnapshotFromSource: function(videoSource, type, time, isUploader, h, w, x, y, quality) {
var promise = Promise.create();
var video = document.createElement("video");
video.src = videoSource;
Function elementFileInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
elementFileInfo: function(elementType, elementEvent, elementAttrs, file) {
try {
var element = document.createElement(elementType);
Objs.iter(elementAttrs, function(value, key) {
element[key] = value;
Function waveChannelTransform
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
waveChannelTransform: function(dumpedInputBuffer, volume, schedulable, schedulableCtx) {
var promise = Promise.create();
var volumeFactor = 0x7FFF * (volume || 1);
var offset = dumpedInputBuffer.offset;
var endOffset = dumpedInputBuffer.endOffset;
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor: function(options) {
inherited.constructor.call(this, options);
this._video = options.video;
this._localPlaybackRequested = options.localPlaybackRequested;
this._recording = false;
Function _googleCastPlayerErrorMessages
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_googleCastPlayerErrorMessages: function(error) {
switch (error.code) {
case chrome.cast.ErrorCode.API_NOT_INITIALIZED:
return 'The API is not initialized.' +
(error.description ? ' :' + error.description : '');
Function bindStreamToVideo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindStreamToVideo: function(stream, video, flip) {
if (!video)
video = document.createElement("video");
video.volume = 0;
video.muted = true;
Function createSnapshot
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
createSnapshot: function(type, video, isUploader, h, w, x, y, quality) {
Function _createSnapshot
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
_createSnapshot: function(type, video, isUploader, h, w, x, y, quality) {
Function createSnapshotDisplay
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
createSnapshotDisplay: function(parent, snapshot, x, y, w, h) {},
Avoid deeply nested control flow statements. Open
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);
Avoid deeply nested control flow statements. Open
Open
if (e.name !== "ConstraintNotSatisfiedError" && e.name !== "OverconstrainedError")
return e;
Avoid deeply nested control flow statements. Open
Open
if (typeof this._videoTrackSettings.videoInnerFrame === 'undefined')
this._videoTrackSettings = Objs.extend(sourceVideoSettings, this._videoTrackSettings);
Function updateSnapshotDisplay
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
updateSnapshotDisplay: function(snapshot, image, x, y, w, h) {
Avoid deeply nested control flow statements. Open
Open
if (isVideo)
this._currentVideo = Objs.ithKey(devices);
else
this._currentAudio = Objs.ithKey(devices);
Function createSnapshotDisplay
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
createSnapshotDisplay: function(parent, snapshot, x, y, w, h) {},
Avoid deeply nested control flow statements. Open
Open
if (!navigator.mediaDevices || !navigator.mediaDevices.getSupportedConstraints || !navigator.mediaDevices.getSupportedConstraints().mediaSource)
return Promise.error("This browser does not support screen recording.");
Avoid deeply nested control flow statements. Open
Open
if (as) {
if (typeof opts.video.mandatory !== 'undefined') {
opts.video.mandatory.minAspectRatio = as;
opts.video.mandatory.maxAspectRatio = as;
} else {
Avoid deeply nested control flow statements. Open
Open
if (Info.isAndroid()) {
opts.video = {};
} else {
opts.video = {
mandatory: {}