@yume-chan/scrcpy
Version:
TypeScript implementation of Scrcpy client.
24 lines (19 loc) • 592 B
text/typescript
import type { StructInit } from "@yume-chan/struct";
import { buffer, struct, u16, u8 } from "@yume-chan/struct";
import type { ScrcpyUHidCreateControlMessage } from "../../latest.js";
export const UHidCreateControlMessage = struct(
{
type: u8,
id: u16,
data: buffer(u16),
},
{ littleEndian: false },
);
export type UHidCreateControlMessage = StructInit<
typeof UHidCreateControlMessage
>;
export function serializeUHidCreateControlMessage(
message: ScrcpyUHidCreateControlMessage,
) {
return UHidCreateControlMessage.serialize(message);
}