chore: code cleanup

This commit is contained in:
Simon Chan 2021-11-09 10:44:25 +08:00
parent c60119ff6c
commit b5bfc52b3c
5 changed files with 3 additions and 6 deletions

View file

@ -22,5 +22,5 @@ const SERVER_VERSION = '1.19';
path.resolve(binFolder, 'scrcpy-server') path.resolve(binFolder, 'scrcpy-server')
); );
fs.writeFile(path.resolve(__dirname, '..', 'src', 'version.ts'), `export const BUNDLED_SERVER_VERSION = "${SERVER_VERSION}";`); fs.writeFile(path.resolve(binFolder, 'version'), SERVER_VERSION);
})(); })();

View file

@ -1,5 +1,4 @@
// From https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel
// See https://developer.android.com/reference/android/media/MediaCodecInfo.CodecProfileLevel
export enum AndroidCodecProfile { export enum AndroidCodecProfile {
Baseline = 0x01, Baseline = 0x01,
Main = 0x02, Main = 0x02,

View file

@ -54,8 +54,8 @@ export class ScrcpyClientReverseConnection extends ScrcpyClientConnection {
private address!: string; private address!: string;
public async initialize(): Promise<void> { public async initialize(): Promise<void> {
// try to unbind first
try { try {
// try to unbind first
await this.device.reverse.remove('localabstract:scrcpy'); await this.device.reverse.remove('localabstract:scrcpy');
} catch { } catch {
// ignore error // ignore error

View file

@ -4,4 +4,3 @@ export * from './connection';
export * from './message'; export * from './message';
export * from './push-server'; export * from './push-server';
export * from './utils'; export * from './utils';
export * from './version';

View file

@ -1 +0,0 @@
export const BUNDLED_SERVER_VERSION = "1.19";