Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling and add sample decoder #84

Merged
merged 9 commits into from
Jun 15, 2021
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/react-dom": "16.0.2",
"electron-packager": "^14.0.2",
"ts-loader": "^2.0.3",
"typescript": "^2.2.2",
"typescript": "^4.2.4",
"webpack": "^2.3.3"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Analyzer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export class AnalyzerView extends React.Component<AnalyzerViewProps, {

// Draw frameCanvas to displayCanvas
(this.displayContext as any).imageSmoothingEnabled = false;
this.displayContext.mozImageSmoothingEnabled = false;
(this.displayContext as any).mozImageSmoothingEnabled = false;
nasirhemed marked this conversation as resolved.
Show resolved Hide resolved
let dw = this.frameSize.w * this.state.scale * this.ratio;
let dh = this.frameSize.h * this.state.scale * this.ratio;
if (this.state.showDecodedImage) {
Expand Down Expand Up @@ -750,7 +750,7 @@ export class AnalyzerView extends React.Component<AnalyzerViewProps, {

this.zoomContext.clearRect(0, 0, dst.w, dst.h);
if (this.state.showDecodedImage) {
this.zoomContext.mozImageSmoothingEnabled = false;
(this.zoomContext as any).mozImageSmoothingEnabled = false;
(this.zoomContext as any).imageSmoothingEnabled = false;
this.zoomContext.clearRect(dst.x, dst.y, dst.w, dst.h);
this.zoomContext.drawImage(this.frameCanvas,
Expand Down
4 changes: 2 additions & 2 deletions src/components/PlayerSplit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ export class PlayerSplitComponent extends React.Component<PlayerSplitComponentPr
document.exitFullscreen();
} else if((document as any).mozCancelFullScreen) {
(document as any).mozCancelFullScreen();
} else if(document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if((document as any).webkitExitFullscreen) {
tdaede marked this conversation as resolved.
Show resolved Hide resolved
(document as any).webkitExitFullscreen();
}
}
function launchIntoFullscreen(element) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/analyzerTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ export class Decoder {
this.workerInfo = {
buildConfig: e.data.payload.buildConfig
}
resolve();
resolve(null);
} else {
reject(`Cannot load decoder, check url: ${url}`);
}
Expand Down
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5",
"jsx": "react",
Expand Down