Loading .vscode/settings.json +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ "tsbuildinfo", "typeof", "undici", "versioncode", "webadb", "webcodecs", "webm", Loading apps/demo/next.config.js +0 −9 Original line number Diff line number Diff line Loading @@ -39,15 +39,6 @@ module.exports = pipe( basePath, }, webpack(config) { // Bundle Scrcpy Server config.module.rules.push({ resourceQuery: /url/, type: "asset/resource", generator: { filename: "static/chunks/[name].[hash][ext]", }, }); config.module.rules.push({ test: /.*\.m?js$/, // disable these modules because they generate a lot of warnings about Loading apps/demo/package.json +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ "@yume-chan/async": "^2.2.0", "@yume-chan/b-tree": "workspace:^0.0.20", "@yume-chan/event": "workspace:^0.0.20", "@yume-chan/fetch-scrcpy-server": "workspace:^0.0.20", "@yume-chan/pcm-player": "workspace:^0.0.20", "@yume-chan/scrcpy": "workspace:^0.0.20", "@yume-chan/scrcpy-decoder-tinyh264": "workspace:^0.0.20", Loading apps/demo/src/components/scrcpy/fetch-server.ts +2 −6 Original line number Diff line number Diff line import { EventEmitter } from "@yume-chan/event"; const SERVER_URL = new URL( "@yume-chan/scrcpy/bin/scrcpy-server?url", import.meta.url ); import { BIN } from "@yume-chan/fetch-scrcpy-server"; class FetchWithProgress { public readonly promise: Promise<Uint8Array>; Loading Loading @@ -68,7 +64,7 @@ export function fetchServer( onProgress?: (e: [downloaded: number, total: number]) => void ) { if (!cachedValue) { cachedValue = new FetchWithProgress(SERVER_URL); cachedValue = new FetchWithProgress(BIN); cachedValue.promise.catch(() => { cachedValue = undefined; }); Loading apps/demo/src/components/scrcpy/settings.tsx +4 −4 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import { ScrcpyVideoDecoderConstructor, TinyH264Decoder, } from "@yume-chan/scrcpy-decoder-tinyh264"; import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version"; import { VERSION } from "@yume-chan/fetch-scrcpy-server"; import { DecodeUtf8Stream, GatherStringStream } from "@yume-chan/stream-extra"; import { autorun, Loading Loading @@ -305,7 +305,7 @@ export const SETTING_DEFINITIONS = computed(() => { const displays = await AdbScrcpyClient.getDisplays( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading Loading @@ -403,7 +403,7 @@ export const SETTING_DEFINITIONS = computed(() => { const encoders = await AdbScrcpyClient.getEncoders( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading Loading @@ -537,7 +537,7 @@ export const SETTING_DEFINITIONS = computed(() => { const encoders = await AdbScrcpyClient.getEncoders( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading Loading
.vscode/settings.json +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ "tsbuildinfo", "typeof", "undici", "versioncode", "webadb", "webcodecs", "webm", Loading
apps/demo/next.config.js +0 −9 Original line number Diff line number Diff line Loading @@ -39,15 +39,6 @@ module.exports = pipe( basePath, }, webpack(config) { // Bundle Scrcpy Server config.module.rules.push({ resourceQuery: /url/, type: "asset/resource", generator: { filename: "static/chunks/[name].[hash][ext]", }, }); config.module.rules.push({ test: /.*\.m?js$/, // disable these modules because they generate a lot of warnings about Loading
apps/demo/package.json +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ "@yume-chan/async": "^2.2.0", "@yume-chan/b-tree": "workspace:^0.0.20", "@yume-chan/event": "workspace:^0.0.20", "@yume-chan/fetch-scrcpy-server": "workspace:^0.0.20", "@yume-chan/pcm-player": "workspace:^0.0.20", "@yume-chan/scrcpy": "workspace:^0.0.20", "@yume-chan/scrcpy-decoder-tinyh264": "workspace:^0.0.20", Loading
apps/demo/src/components/scrcpy/fetch-server.ts +2 −6 Original line number Diff line number Diff line import { EventEmitter } from "@yume-chan/event"; const SERVER_URL = new URL( "@yume-chan/scrcpy/bin/scrcpy-server?url", import.meta.url ); import { BIN } from "@yume-chan/fetch-scrcpy-server"; class FetchWithProgress { public readonly promise: Promise<Uint8Array>; Loading Loading @@ -68,7 +64,7 @@ export function fetchServer( onProgress?: (e: [downloaded: number, total: number]) => void ) { if (!cachedValue) { cachedValue = new FetchWithProgress(SERVER_URL); cachedValue = new FetchWithProgress(BIN); cachedValue.promise.catch(() => { cachedValue = undefined; }); Loading
apps/demo/src/components/scrcpy/settings.tsx +4 −4 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import { ScrcpyVideoDecoderConstructor, TinyH264Decoder, } from "@yume-chan/scrcpy-decoder-tinyh264"; import SCRCPY_SERVER_VERSION from "@yume-chan/scrcpy/bin/version"; import { VERSION } from "@yume-chan/fetch-scrcpy-server"; import { DecodeUtf8Stream, GatherStringStream } from "@yume-chan/stream-extra"; import { autorun, Loading Loading @@ -305,7 +305,7 @@ export const SETTING_DEFINITIONS = computed(() => { const displays = await AdbScrcpyClient.getDisplays( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading Loading @@ -403,7 +403,7 @@ export const SETTING_DEFINITIONS = computed(() => { const encoders = await AdbScrcpyClient.getEncoders( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading Loading @@ -537,7 +537,7 @@ export const SETTING_DEFINITIONS = computed(() => { const encoders = await AdbScrcpyClient.getEncoders( GLOBAL_STATE.adb!, DEFAULT_SERVER_PATH, SCRCPY_SERVER_VERSION, VERSION, new AdbScrcpyOptionsLatest( new ScrcpyOptionsLatest({ logLevel: ScrcpyLogLevel.Debug, Loading