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 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 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 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 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 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 _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) {
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 (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);
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.screen) {
var extensionId = this.chromeExtensionExtract(options.screen).extensionId;
if (!extensionId)
return Promise.error("This browser does not support screen recording.");
var pingTest = Time.now();
Function updateSnapshotDisplay
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
updateSnapshotDisplay: function(snapshot, display, x, y, w, h) {},
Avoid deeply nested control flow statements. Open
Open
if (('opus'.localeCompare(match) === 0) || ('isac'.localeCompare(match) === 0) || ('g722'.localeCompare(match) === 0) || ('pcmu'.localeCompare(match) === 0) ||
('pcma'.localeCompare(match) === 0) || ('cn'.localeCompare(match) === 0)) {
if (enhanceData.audioBitrate !== undefined) {
sdpStrRet += 'a=fmtp:' + rtpmapID[1] + ' x-google-min-bitrate=' + (enhanceData.audioBitrate) + ';x-google-max-bitrate=' + (enhanceData.audioBitrate) + '\r\n';
}
Avoid deeply nested control flow statements. Open
Open
if (typeof this._videoTrackSettings.videoInnerFrame === 'undefined')
this._videoTrackSettings = Objs.extend(sourceVideoSettings, this._videoTrackSettings);
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.getDisplayMedia) {
promise = Promise.create();
var pr = navigator.getDisplayMedia({
video: true
});
Avoid deeply nested control flow statements. Open
Open
if (typeof opts.video.mandatory !== 'undefined') {
if (options.video.width) {
opts.video.mandatory.minWidth = options.video.width;
opts.video.mandatory.maxWidth = options.video.width;
}