chore: update docs

This commit is contained in:
Simon Chan 2023-01-06 19:18:58 +08:00
parent c2fa194d08
commit 312684209c
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
11 changed files with 573 additions and 475 deletions

View file

@ -10,8 +10,10 @@
"Cascadia",
"CLSE",
"CNXN",
"colour",
"Deserialization",
"DESERIALIZERS",
"ebml",
"Embedder",
"fluentui",
"genymobile",
@ -24,7 +26,10 @@
"Logcat",
"lstat",
"luma",
"Matroska",
"mitm",
"muxer",
"Muxing",
"Nalu",
"opendir",
"PKCS",
@ -43,6 +48,7 @@
"typeof",
"webadb",
"webcodecs",
"webm",
"websockify",
"webusb",
"wifi",

View file

@ -20,7 +20,7 @@ cd ya-webadb
### Install dependencies
```sh
$ rush update
$ rush install
```
### Everyday commands

View file

@ -1,4 +1,4 @@
const withMDX = require('@next/mdx')({
const withMDX = require("@next/mdx")({
extension: /\.mdx?$/,
options: {
// Disable MDX createElement hack
@ -9,16 +9,16 @@ const withMDX = require('@next/mdx')({
/** @type {import('next').NextConfig} */
module.exports = withMDX({
basePath: process.env.BASE_PATH || '',
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
basePath: process.env.BASE_PATH || "",
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
reactStrictMode: false,
productionBrowserSourceMaps: true,
experimental: {
// Workaround https://github.com/vercel/next.js/issues/33914
esmExternals: 'loose',
esmExternals: "loose",
},
publicRuntimeConfig: {
basePath: process.env.BASE_PATH || '',
basePath: process.env.BASE_PATH || "",
},
webpack(config, options) {
config.module.rules.push({
@ -37,11 +37,9 @@ module.exports = withMDX({
// because Next.js doesn't allow it
// https://github.com/vercel/next.js/pull/7550#issuecomment-512861158
// https://github.com/vercel/next.js/issues/12861
exclude: [
/next/,
],
use: ['source-map-loader'],
enforce: 'pre',
exclude: [/next/],
use: ["source-map-loader"],
enforce: "pre",
});
// config.experiments.topLevelAwait = true;
@ -51,18 +49,18 @@ module.exports = withMDX({
async headers() {
return [
{
source: '/:path*',
source: "/:path*",
headers: [
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin',
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
{
key: 'Cross-Origin-Embedder-Policy',
value: 'require-corp',
}
]
}
]
}
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
],
},
];
},
});

View file

@ -43,6 +43,7 @@
},
"devDependencies": {
"@mdx-js/loader": "^2.2.1",
"@mdx-js/react": "^2.2.1",
"@next/mdx": "^13.1.1",
"@types/react": "18.0.26",
"eslint": "^8.31.0",

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "9b47a0132b67e3dcc20c38064f43b28f8a00584d",
"pnpmShrinkwrapHash": "ff5c2eeb98b24e6661bbda25a47bad1a240d4d69",
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
}

View file

@ -5,7 +5,8 @@
"keywords": [
"adb",
"android-phone",
"scrcpy-decoder-tinyh264"
"scrcpy",
"scrcpy-decoder"
],
"license": "MIT",
"author": {

View file

@ -5,7 +5,8 @@
"keywords": [
"adb",
"android-phone",
"scrcpy-decoder-webcodecs"
"scrcpy",
"scrcpy-decoder"
],
"license": "MIT",
"author": {

View file

@ -1,17 +1,21 @@
#!/usr/bin/env node
const { fetchVersion } = require('gh-release-fetch');
const path = require('path');
const fs = require('fs').promises;
const { fetchVersion } = require("gh-release-fetch");
const path = require("path");
const fs = require("fs").promises;
(async () => {
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({
repository: 'Genymobile/scrcpy',
repository: "Genymobile/scrcpy",
version: `v${serverVersion}`,
package: `scrcpy-server-v${serverVersion}`,
destination: binFolder,
@ -20,9 +24,15 @@ const fs = require('fs').promises;
await fs.rename(
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(path.resolve(binFolder, 'version.d.ts'), `export default '${serverVersion}';`);
fs.writeFile(
path.resolve(binFolder, "version.js"),
`export default '${serverVersion}';`
);
fs.writeFile(
path.resolve(binFolder, "version.d.ts"),
`export default '${serverVersion}';`
);
})();

View file

@ -1,5 +1,6 @@
// cspell: ignore golomb
// cspell: ignore qpprime
// cspell: ignore colour
// 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".
@ -52,6 +53,9 @@ class BitReader {
/**
* 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> {
// -1 means we haven't found the first start code

View file

@ -226,9 +226,7 @@
/**
* The list of shell commands to run after the Rush installation finishes
*/
"postRushInstall": [
"rush postinstall"
],
"postRushInstall": [],
/**
* The list of shell commands to run before the Rush build command starts
*/