mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
chore: update docs
This commit is contained in:
parent
c2fa194d08
commit
312684209c
11 changed files with 573 additions and 475 deletions
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
|
@ -10,8 +10,10 @@
|
||||||
"Cascadia",
|
"Cascadia",
|
||||||
"CLSE",
|
"CLSE",
|
||||||
"CNXN",
|
"CNXN",
|
||||||
|
"colour",
|
||||||
"Deserialization",
|
"Deserialization",
|
||||||
"DESERIALIZERS",
|
"DESERIALIZERS",
|
||||||
|
"ebml",
|
||||||
"Embedder",
|
"Embedder",
|
||||||
"fluentui",
|
"fluentui",
|
||||||
"genymobile",
|
"genymobile",
|
||||||
|
@ -24,7 +26,10 @@
|
||||||
"Logcat",
|
"Logcat",
|
||||||
"lstat",
|
"lstat",
|
||||||
"luma",
|
"luma",
|
||||||
|
"Matroska",
|
||||||
"mitm",
|
"mitm",
|
||||||
|
"muxer",
|
||||||
|
"Muxing",
|
||||||
"Nalu",
|
"Nalu",
|
||||||
"opendir",
|
"opendir",
|
||||||
"PKCS",
|
"PKCS",
|
||||||
|
@ -43,6 +48,7 @@
|
||||||
"typeof",
|
"typeof",
|
||||||
"webadb",
|
"webadb",
|
||||||
"webcodecs",
|
"webcodecs",
|
||||||
|
"webm",
|
||||||
"websockify",
|
"websockify",
|
||||||
"webusb",
|
"webusb",
|
||||||
"wifi",
|
"wifi",
|
||||||
|
|
|
@ -20,7 +20,7 @@ cd ya-webadb
|
||||||
### Install dependencies
|
### Install dependencies
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ rush update
|
$ rush install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Everyday commands
|
### Everyday commands
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const withMDX = require('@next/mdx')({
|
const withMDX = require("@next/mdx")({
|
||||||
extension: /\.mdx?$/,
|
extension: /\.mdx?$/,
|
||||||
options: {
|
options: {
|
||||||
// Disable MDX createElement hack
|
// Disable MDX createElement hack
|
||||||
|
@ -9,16 +9,16 @@ const withMDX = require('@next/mdx')({
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
module.exports = withMDX({
|
module.exports = withMDX({
|
||||||
basePath: process.env.BASE_PATH || '',
|
basePath: process.env.BASE_PATH || "",
|
||||||
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
|
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
|
||||||
reactStrictMode: false,
|
reactStrictMode: false,
|
||||||
productionBrowserSourceMaps: true,
|
productionBrowserSourceMaps: true,
|
||||||
experimental: {
|
experimental: {
|
||||||
// Workaround https://github.com/vercel/next.js/issues/33914
|
// Workaround https://github.com/vercel/next.js/issues/33914
|
||||||
esmExternals: 'loose',
|
esmExternals: "loose",
|
||||||
},
|
},
|
||||||
publicRuntimeConfig: {
|
publicRuntimeConfig: {
|
||||||
basePath: process.env.BASE_PATH || '',
|
basePath: process.env.BASE_PATH || "",
|
||||||
},
|
},
|
||||||
webpack(config, options) {
|
webpack(config, options) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
|
@ -37,11 +37,9 @@ module.exports = withMDX({
|
||||||
// because Next.js doesn't allow it
|
// because Next.js doesn't allow it
|
||||||
// https://github.com/vercel/next.js/pull/7550#issuecomment-512861158
|
// https://github.com/vercel/next.js/pull/7550#issuecomment-512861158
|
||||||
// https://github.com/vercel/next.js/issues/12861
|
// https://github.com/vercel/next.js/issues/12861
|
||||||
exclude: [
|
exclude: [/next/],
|
||||||
/next/,
|
use: ["source-map-loader"],
|
||||||
],
|
enforce: "pre",
|
||||||
use: ['source-map-loader'],
|
|
||||||
enforce: 'pre',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// config.experiments.topLevelAwait = true;
|
// config.experiments.topLevelAwait = true;
|
||||||
|
@ -51,18 +49,18 @@ module.exports = withMDX({
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: '/:path*',
|
source: "/:path*",
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
key: 'Cross-Origin-Opener-Policy',
|
key: "Cross-Origin-Opener-Policy",
|
||||||
value: 'same-origin',
|
value: "same-origin",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'Cross-Origin-Embedder-Policy',
|
key: "Cross-Origin-Embedder-Policy",
|
||||||
value: 'require-corp',
|
value: "require-corp",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@mdx-js/loader": "^2.2.1",
|
"@mdx-js/loader": "^2.2.1",
|
||||||
|
"@mdx-js/react": "^2.2.1",
|
||||||
"@next/mdx": "^13.1.1",
|
"@next/mdx": "^13.1.1",
|
||||||
"@types/react": "18.0.26",
|
"@types/react": "18.0.26",
|
||||||
"eslint": "^8.31.0",
|
"eslint": "^8.31.0",
|
||||||
|
|
957
common/config/rush/pnpm-lock.yaml
generated
957
common/config/rush/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
|
||||||
{
|
{
|
||||||
"pnpmShrinkwrapHash": "9b47a0132b67e3dcc20c38064f43b28f8a00584d",
|
"pnpmShrinkwrapHash": "ff5c2eeb98b24e6661bbda25a47bad1a240d4d69",
|
||||||
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"adb",
|
"adb",
|
||||||
"android-phone",
|
"android-phone",
|
||||||
"scrcpy-decoder-tinyh264"
|
"scrcpy",
|
||||||
|
"scrcpy-decoder"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": {
|
"author": {
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"adb",
|
"adb",
|
||||||
"android-phone",
|
"android-phone",
|
||||||
"scrcpy-decoder-webcodecs"
|
"scrcpy",
|
||||||
|
"scrcpy-decoder"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": {
|
"author": {
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const { fetchVersion } = require('gh-release-fetch');
|
const { fetchVersion } = require("gh-release-fetch");
|
||||||
const path = require('path');
|
const path = require("path");
|
||||||
const fs = require('fs').promises;
|
const fs = require("fs").promises;
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const serverVersion = process.argv[2];
|
const serverVersion = process.argv[2];
|
||||||
console.log(`Downloading Scrcpy server binary version ${serverVersion}...`);
|
if (!serverVersion) {
|
||||||
|
console.log("Usage: fetch-scrcpy-server <version>");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const binFolder = path.resolve(__dirname, '..', 'bin');
|
console.log(`Downloading Scrcpy server binary version ${serverVersion}...`);
|
||||||
|
const binFolder = path.resolve(__dirname, "..", "bin");
|
||||||
|
|
||||||
await fetchVersion({
|
await fetchVersion({
|
||||||
repository: 'Genymobile/scrcpy',
|
repository: "Genymobile/scrcpy",
|
||||||
version: `v${serverVersion}`,
|
version: `v${serverVersion}`,
|
||||||
package: `scrcpy-server-v${serverVersion}`,
|
package: `scrcpy-server-v${serverVersion}`,
|
||||||
destination: binFolder,
|
destination: binFolder,
|
||||||
|
@ -20,9 +24,15 @@ const fs = require('fs').promises;
|
||||||
|
|
||||||
await fs.rename(
|
await fs.rename(
|
||||||
path.resolve(binFolder, `scrcpy-server-v${serverVersion}`),
|
path.resolve(binFolder, `scrcpy-server-v${serverVersion}`),
|
||||||
path.resolve(binFolder, 'scrcpy-server')
|
path.resolve(binFolder, "scrcpy-server")
|
||||||
);
|
);
|
||||||
|
|
||||||
fs.writeFile(path.resolve(binFolder, 'version.js'), `export default '${serverVersion}';`);
|
fs.writeFile(
|
||||||
fs.writeFile(path.resolve(binFolder, 'version.d.ts'), `export default '${serverVersion}';`);
|
path.resolve(binFolder, "version.js"),
|
||||||
|
`export default '${serverVersion}';`
|
||||||
|
);
|
||||||
|
fs.writeFile(
|
||||||
|
path.resolve(binFolder, "version.d.ts"),
|
||||||
|
`export default '${serverVersion}';`
|
||||||
|
);
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// cspell: ignore golomb
|
// cspell: ignore golomb
|
||||||
// cspell: ignore qpprime
|
// cspell: ignore qpprime
|
||||||
|
// cspell: ignore colour
|
||||||
|
|
||||||
// H.264 has two standards: ITU-T H.264 and ISO/IEC 14496-10
|
// H.264 has two standards: ITU-T H.264 and ISO/IEC 14496-10
|
||||||
// they have the same content, and refer themselves as "H.264".
|
// they have the same content, and refer themselves as "H.264".
|
||||||
|
@ -52,6 +53,9 @@ class BitReader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse NAL units from H.264 Annex B formatted data.
|
* Parse NAL units from H.264 Annex B formatted data.
|
||||||
|
*
|
||||||
|
* It will overwrite the input to decode the encoding.
|
||||||
|
* If the input is still needed, make a copy before calling this method.
|
||||||
*/
|
*/
|
||||||
function* iterateNalu(buffer: Uint8Array): Generator<Uint8Array> {
|
function* iterateNalu(buffer: Uint8Array): Generator<Uint8Array> {
|
||||||
// -1 means we haven't found the first start code
|
// -1 means we haven't found the first start code
|
||||||
|
|
|
@ -226,9 +226,7 @@
|
||||||
/**
|
/**
|
||||||
* The list of shell commands to run after the Rush installation finishes
|
* The list of shell commands to run after the Rush installation finishes
|
||||||
*/
|
*/
|
||||||
"postRushInstall": [
|
"postRushInstall": [],
|
||||||
"rush postinstall"
|
|
||||||
],
|
|
||||||
/**
|
/**
|
||||||
* The list of shell commands to run before the Rush build command starts
|
* The list of shell commands to run before the Rush build command starts
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue