Skip to content

Commit 7b6b4c4

Browse files
authored
Merge pull request #77 from rvalitov/fix/TSLint-errors
Fix TSLint errors
2 parents 8de1aa4 + 9b1748f commit 7b6b4c4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/common/HTMLCanvasElementLuminanceSource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class HTMLCanvasElementLuminanceSource extends LuminanceSource {
3333
// .299R + 0.587G + 0.114B (YUV/YIQ for PAL and NTSC),
3434
// (306*R) >> 10 is approximately equal to R*0.299, and so on.
3535
// 0x200 >> 10 is 0.5, it implements rounding.
36+
// tslint:disable-next-line:no-bitwise
3637
gray = (306 * pixelR + 601 * pixelG + 117 * pixelB + 0x200) >> 10;
3738
}
3839
grayscaleBuffer[j] = gray;

src/readers/BrowserCodeReader.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,13 @@ export class BrowserCodeReader {
287287
public static async tryPlayVideo(videoElement: HTMLVideoElement): Promise<boolean> {
288288

289289
if (videoElement?.ended) {
290+
// tslint:disable-next-line:no-console
290291
console.error('Trying to play video that has ended.');
291292
return false;
292293
}
293294

294295
if (BrowserCodeReader.isVideoPlaying(videoElement)) {
296+
// tslint:disable-next-line:no-console
295297
console.warn('Trying to play video that is already playing.');
296298
return true;
297299
}
@@ -300,6 +302,7 @@ export class BrowserCodeReader {
300302
await videoElement.play();
301303
return true;
302304
} catch (error) {
305+
// tslint:disable-next-line:no-console
303306
console.warn('It was not possible to play the video.', error);
304307
return false;
305308
}

0 commit comments

Comments
 (0)