forked from yume-chan/ya-webadb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
164 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import type { Adb } from "@gasol/adb"; | ||
import type { | ||
ScrcpyDisplay, | ||
ScrcpyEncoder, | ||
ScrcpyOptionsInit2_3, | ||
} from "@gasol/scrcpy"; | ||
|
||
import type { AdbScrcpyConnection } from "../connection.js"; | ||
|
||
import { AdbScrcpyOptions1_16 } from "./1_16.js"; | ||
import { AdbScrcpyOptions2_0 } from "./2_0.js"; | ||
import { AdbScrcpyOptions } from "./types.js"; | ||
|
||
export class AdbScrcpyOptions2_3 extends AdbScrcpyOptions< | ||
// Only pick options that are used in this class, | ||
// so changes in `ScrcpyOptionsInitX_XX` won't affect type assignability with this class | ||
Pick< | ||
ScrcpyOptionsInit2_3, | ||
| "displayOrientation" | ||
| "tunnelForward" | ||
| "control" | ||
| "sendDummyByte" | ||
| "scid" | ||
| "audio" | ||
| "video" | ||
> | ||
> { | ||
override async getEncoders( | ||
adb: Adb, | ||
path: string, | ||
version: string, | ||
): Promise<ScrcpyEncoder[]> { | ||
return AdbScrcpyOptions2_0.getEncoders(adb, path, version, this); | ||
} | ||
|
||
override getDisplays( | ||
adb: Adb, | ||
path: string, | ||
version: string, | ||
): Promise<ScrcpyDisplay[]> { | ||
return AdbScrcpyOptions1_16.getDisplays(adb, path, version, this); | ||
} | ||
|
||
override createConnection(adb: Adb): AdbScrcpyConnection { | ||
return AdbScrcpyOptions1_16.createConnection( | ||
adb, | ||
{ | ||
scid: this.value.scid.value, | ||
video: this.value.video, | ||
audio: this.value.audio, | ||
control: this.value.control, | ||
sendDummyByte: this.value.sendDummyByte, | ||
}, | ||
this.tunnelForwardOverride || this.value.tunnelForward, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.