Method _draw
length is 55 lines (max allowed is 50) Open
function _draw() {
if (_videoElement.paused || _videoElement.ended) return;
//_context.drawImage(_videoElement, 0, 200, 480, 50, 0, 0, 480, 50);
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for long methods. If a method becomes very long it is hard to understand. Therefore long methods should usually be refactored into several individual methods that focus on a specific task.
0x003366
is a magic number Open
options.backgroundColor = 0x003366;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
400
is a magic number Open
_playBtn.height = 400;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
400
is a magic number Open
_canvas.width = 400;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
5
is a magic number Open
var uri:Array<String> = subtitles[5].split('=');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
400
is a magic number Open
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
16
is a magic number Open
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
160
is a magic number Open
if (lines != null && lines[4] != null && lines[4].charCodeAt(0) != 160) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
400
is a magic number Open
_playBtn.width = 400;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
384
is a magic number Open
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
400
is a magic number Open
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
16
is a magic number Open
_canvas.height = 16;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
5
is a magic number Open
var webVTT = lines[5];
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
16
is a magic number Open
_context.drawImage(_videoElement, 0, 384, 400, 16, 0, 0, 400, 16);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that there are no magic numbers. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
String absolute
appears 3 times in the file Open
_canvas.style.position = "absolute";
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
String http://93.93.85.123:1935/live/
appears 3 times in the file Open
var subtitleUrl = 'http://93.93.85.123:1935/live/' + movie + '/' + webVTT;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
String GET
appears 3 times in the file Open
subtitlePlaylistRequest.open('GET', subtitlePlaylistUrl, true);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks for multiple occurrences of the same string literal within a single file. Code duplication makes maintenance more difficult, so it's better to replace the multiple occurrences with a constant.
Invalid member signature: movie
(name should be ~/^_[a-z][a-zA-Z0-9]*$/
) Open
var movie:String;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that instance variable names conform to a format specified by the format
property.
Invalid member signature: subtitlePlaylistUrl
(name should be ~/^_[a-z][a-zA-Z0-9]*$/
) Open
var subtitlePlaylistUrl:String;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that instance variable names conform to a format specified by the format
property.
Invalid method name signature: main
(name should be ~/^_[a-z][a-zA-Z0-9]*$/
) Open
static function main() {
new Main();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Checks that method names conform to a format specified by the format
property.