@midscene/android-playground 1.12.6-beta-20260910093036.0 → 1.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/bin.mjs +7 -10
- package/dist/es/index.mjs +7 -10
- package/dist/lib/bin.js +7 -10
- package/dist/lib/index.js +7 -10
- package/dist/types/scrcpy-server.d.ts +0 -7
- package/package.json +5 -5
- package/static/index.html +1 -1
- package/static/static/js/index.cff28434.js +855 -0
- package/static/static/js/index.cff28434.js.map +1 -0
- package/static/static/js/index.2dc019e1.js +0 -855
- package/static/static/js/index.2dc019e1.js.map +0 -1
- /package/static/static/js/{index.2dc019e1.js.LICENSE.txt → index.cff28434.js.LICENSE.txt} +0 -0
package/dist/es/bin.mjs
CHANGED
|
@@ -235,14 +235,6 @@ const LOOPBACK_HOSTS = new Set([
|
|
|
235
235
|
'[::1]'
|
|
236
236
|
]);
|
|
237
237
|
const MAX_SCRCPY_OUTPUT_LINES = 100;
|
|
238
|
-
function buildScrcpyVideoPacket(packet, timestamp = Date.now()) {
|
|
239
|
-
return {
|
|
240
|
-
data: packet.data,
|
|
241
|
-
type: packet.type,
|
|
242
|
-
timestamp,
|
|
243
|
-
keyFrame: 'data' === packet.type ? packet.keyframe : void 0
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
238
|
function appendBoundedScrcpyOutput(outputLines, line, maxLines = MAX_SCRCPY_OUTPUT_LINES) {
|
|
247
239
|
outputLines.push(line);
|
|
248
240
|
if (outputLines.length > maxLines) outputLines.splice(0, outputLines.length - maxLines);
|
|
@@ -575,8 +567,13 @@ class ScrcpyServer {
|
|
|
575
567
|
const { done, value } = await reader.read();
|
|
576
568
|
if (done) break;
|
|
577
569
|
if (!isCurrentGeneration() || activeSession !== streamSession) return;
|
|
578
|
-
const
|
|
579
|
-
socket.emit('video-data',
|
|
570
|
+
const frameType = value.type || 'data';
|
|
571
|
+
socket.volatile.emit('video-data', {
|
|
572
|
+
data: value.data,
|
|
573
|
+
type: frameType,
|
|
574
|
+
timestamp: Date.now(),
|
|
575
|
+
keyFrame: value.keyFrame
|
|
576
|
+
});
|
|
580
577
|
}
|
|
581
578
|
} catch (error) {
|
|
582
579
|
console.error('error processing video stream:', error);
|
package/dist/es/index.mjs
CHANGED
|
@@ -235,14 +235,6 @@ const LOOPBACK_HOSTS = new Set([
|
|
|
235
235
|
'[::1]'
|
|
236
236
|
]);
|
|
237
237
|
const MAX_SCRCPY_OUTPUT_LINES = 100;
|
|
238
|
-
function buildScrcpyVideoPacket(packet, timestamp = Date.now()) {
|
|
239
|
-
return {
|
|
240
|
-
data: packet.data,
|
|
241
|
-
type: packet.type,
|
|
242
|
-
timestamp,
|
|
243
|
-
keyFrame: 'data' === packet.type ? packet.keyframe : void 0
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
238
|
function appendBoundedScrcpyOutput(outputLines, line, maxLines = MAX_SCRCPY_OUTPUT_LINES) {
|
|
247
239
|
outputLines.push(line);
|
|
248
240
|
if (outputLines.length > maxLines) outputLines.splice(0, outputLines.length - maxLines);
|
|
@@ -575,8 +567,13 @@ class ScrcpyServer {
|
|
|
575
567
|
const { done, value } = await reader.read();
|
|
576
568
|
if (done) break;
|
|
577
569
|
if (!isCurrentGeneration() || activeSession !== streamSession) return;
|
|
578
|
-
const
|
|
579
|
-
socket.emit('video-data',
|
|
570
|
+
const frameType = value.type || 'data';
|
|
571
|
+
socket.volatile.emit('video-data', {
|
|
572
|
+
data: value.data,
|
|
573
|
+
type: frameType,
|
|
574
|
+
timestamp: Date.now(),
|
|
575
|
+
keyFrame: value.keyFrame
|
|
576
|
+
});
|
|
580
577
|
}
|
|
581
578
|
} catch (error) {
|
|
582
579
|
console.error('error processing video stream:', error);
|
package/dist/lib/bin.js
CHANGED
|
@@ -261,14 +261,6 @@ const LOOPBACK_HOSTS = new Set([
|
|
|
261
261
|
'[::1]'
|
|
262
262
|
]);
|
|
263
263
|
const MAX_SCRCPY_OUTPUT_LINES = 100;
|
|
264
|
-
function buildScrcpyVideoPacket(packet, timestamp = Date.now()) {
|
|
265
|
-
return {
|
|
266
|
-
data: packet.data,
|
|
267
|
-
type: packet.type,
|
|
268
|
-
timestamp,
|
|
269
|
-
keyFrame: 'data' === packet.type ? packet.keyframe : void 0
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
264
|
function appendBoundedScrcpyOutput(outputLines, line, maxLines = MAX_SCRCPY_OUTPUT_LINES) {
|
|
273
265
|
outputLines.push(line);
|
|
274
266
|
if (outputLines.length > maxLines) outputLines.splice(0, outputLines.length - maxLines);
|
|
@@ -601,8 +593,13 @@ class ScrcpyServer {
|
|
|
601
593
|
const { done, value } = await reader.read();
|
|
602
594
|
if (done) break;
|
|
603
595
|
if (!isCurrentGeneration() || activeSession !== streamSession) return;
|
|
604
|
-
const
|
|
605
|
-
socket.emit('video-data',
|
|
596
|
+
const frameType = value.type || 'data';
|
|
597
|
+
socket.volatile.emit('video-data', {
|
|
598
|
+
data: value.data,
|
|
599
|
+
type: frameType,
|
|
600
|
+
timestamp: Date.now(),
|
|
601
|
+
keyFrame: value.keyFrame
|
|
602
|
+
});
|
|
606
603
|
}
|
|
607
604
|
} catch (error) {
|
|
608
605
|
console.error('error processing video stream:', error);
|
package/dist/lib/index.js
CHANGED
|
@@ -276,14 +276,6 @@ const LOOPBACK_HOSTS = new Set([
|
|
|
276
276
|
'[::1]'
|
|
277
277
|
]);
|
|
278
278
|
const MAX_SCRCPY_OUTPUT_LINES = 100;
|
|
279
|
-
function buildScrcpyVideoPacket(packet, timestamp = Date.now()) {
|
|
280
|
-
return {
|
|
281
|
-
data: packet.data,
|
|
282
|
-
type: packet.type,
|
|
283
|
-
timestamp,
|
|
284
|
-
keyFrame: 'data' === packet.type ? packet.keyframe : void 0
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
279
|
function appendBoundedScrcpyOutput(outputLines, line, maxLines = MAX_SCRCPY_OUTPUT_LINES) {
|
|
288
280
|
outputLines.push(line);
|
|
289
281
|
if (outputLines.length > maxLines) outputLines.splice(0, outputLines.length - maxLines);
|
|
@@ -616,8 +608,13 @@ class ScrcpyServer {
|
|
|
616
608
|
const { done, value } = await reader.read();
|
|
617
609
|
if (done) break;
|
|
618
610
|
if (!isCurrentGeneration() || activeSession !== streamSession) return;
|
|
619
|
-
const
|
|
620
|
-
socket.emit('video-data',
|
|
611
|
+
const frameType = value.type || 'data';
|
|
612
|
+
socket.volatile.emit('video-data', {
|
|
613
|
+
data: value.data,
|
|
614
|
+
type: frameType,
|
|
615
|
+
timestamp: Date.now(),
|
|
616
|
+
keyFrame: value.keyFrame
|
|
617
|
+
});
|
|
621
618
|
}
|
|
622
619
|
} catch (error) {
|
|
623
620
|
console.error('error processing video stream:', error);
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import type { Server as HttpServer } from 'node:http';
|
|
2
2
|
import type { AdbServerClient } from '@yume-chan/adb';
|
|
3
|
-
import type { ScrcpyMediaStreamPacket } from '@yume-chan/scrcpy';
|
|
4
3
|
import express from 'express';
|
|
5
4
|
import { Server } from 'socket.io';
|
|
6
5
|
export declare const debugPage: import("@midscene/shared/logger").DebugFunction;
|
|
7
|
-
export declare function buildScrcpyVideoPacket(packet: ScrcpyMediaStreamPacket, timestamp?: number): {
|
|
8
|
-
data: Uint8Array<ArrayBufferLike>;
|
|
9
|
-
type: "configuration" | "data";
|
|
10
|
-
timestamp: number;
|
|
11
|
-
keyFrame: boolean | undefined;
|
|
12
|
-
};
|
|
13
6
|
export declare function appendBoundedScrcpyOutput(outputLines: string[], line: string, maxLines?: number): void;
|
|
14
7
|
export interface ScrcpyConnectDeviceRequest {
|
|
15
8
|
deviceId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android-playground",
|
|
3
|
-
"version": "1.12.6
|
|
3
|
+
"version": "1.12.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/midscene.git",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"express": "^4.21.2",
|
|
40
40
|
"open": "10.1.0",
|
|
41
41
|
"socket.io": "^4.8.1",
|
|
42
|
-
"@midscene/android": "1.12.6
|
|
43
|
-
"@midscene/
|
|
44
|
-
"@midscene/
|
|
45
|
-
"@midscene/
|
|
42
|
+
"@midscene/android": "1.12.6",
|
|
43
|
+
"@midscene/core": "1.12.6",
|
|
44
|
+
"@midscene/playground": "1.12.6",
|
|
45
|
+
"@midscene/shared": "1.12.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rslib/core": "^0.18.3",
|
package/static/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><title>Midscene Android Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.574e3de9.js"></script><script defer src="/static/js/415.dadb20cf.js"></script><script defer src="/static/js/index.
|
|
1
|
+
<!doctype html><html><head><title>Midscene Android Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.574e3de9.js"></script><script defer src="/static/js/415.dadb20cf.js"></script><script defer src="/static/js/index.cff28434.js"></script><link href="/static/css/index.67caac18.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|