File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export class HTMLCanvasElementLuminanceSource extends LuminanceSource {
33
33
// .299R + 0.587G + 0.114B (YUV/YIQ for PAL and NTSC),
34
34
// (306*R) >> 10 is approximately equal to R*0.299, and so on.
35
35
// 0x200 >> 10 is 0.5, it implements rounding.
36
+ // tslint:disable-next-line:no-bitwise
36
37
gray = ( 306 * pixelR + 601 * pixelG + 117 * pixelB + 0x200 ) >> 10 ;
37
38
}
38
39
grayscaleBuffer [ j ] = gray ;
Original file line number Diff line number Diff line change @@ -287,11 +287,13 @@ export class BrowserCodeReader {
287
287
public static async tryPlayVideo ( videoElement : HTMLVideoElement ) : Promise < boolean > {
288
288
289
289
if ( videoElement ?. ended ) {
290
+ // tslint:disable-next-line:no-console
290
291
console . error ( 'Trying to play video that has ended.' ) ;
291
292
return false ;
292
293
}
293
294
294
295
if ( BrowserCodeReader . isVideoPlaying ( videoElement ) ) {
296
+ // tslint:disable-next-line:no-console
295
297
console . warn ( 'Trying to play video that is already playing.' ) ;
296
298
return true ;
297
299
}
@@ -300,6 +302,7 @@ export class BrowserCodeReader {
300
302
await videoElement . play ( ) ;
301
303
return true ;
302
304
} catch ( error ) {
305
+ // tslint:disable-next-line:no-console
303
306
console . warn ( 'It was not possible to play the video.' , error ) ;
304
307
return false ;
305
308
}
You can’t perform that action at this time.
0 commit comments