UNPKG

@yume-chan/scrcpy

Version:
58 lines 2.77 kB
import Struct, { placeholder } from "@yume-chan/struct"; import { ScrcpyControlMessageType } from "../control/index.js"; import { SCRCPY_CONTROL_MESSAGE_TYPES_1_16, ScrcpyBackOrScreenOnControlMessage1_16, ScrcpyOptions1_16, } from "./1_16/index.js"; import { ScrcpyOptions1_17 } from "./1_17.js"; import { ScrcpyOptions } from "./types.js"; export var ScrcpyLogLevel1_18; (function (ScrcpyLogLevel1_18) { ScrcpyLogLevel1_18["Verbose"] = "verbose"; ScrcpyLogLevel1_18["Debug"] = "debug"; ScrcpyLogLevel1_18["Info"] = "info"; ScrcpyLogLevel1_18["Warn"] = "warn"; ScrcpyLogLevel1_18["Error"] = "error"; })(ScrcpyLogLevel1_18 || (ScrcpyLogLevel1_18 = {})); export var ScrcpyVideoOrientation1_18; (function (ScrcpyVideoOrientation1_18) { ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["Initial"] = -2] = "Initial"; ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["Unlocked"] = -1] = "Unlocked"; ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["Portrait"] = 0] = "Portrait"; ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["Landscape"] = 1] = "Landscape"; ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["PortraitFlipped"] = 2] = "PortraitFlipped"; ScrcpyVideoOrientation1_18[ScrcpyVideoOrientation1_18["LandscapeFlipped"] = 3] = "LandscapeFlipped"; })(ScrcpyVideoOrientation1_18 || (ScrcpyVideoOrientation1_18 = {})); export const ScrcpyBackOrScreenOnControlMessage1_18 = new Struct() .concat(ScrcpyBackOrScreenOnControlMessage1_16) .uint8("action", placeholder()); export const SCRCPY_CONTROL_MESSAGE_TYPES_1_18 = SCRCPY_CONTROL_MESSAGE_TYPES_1_16.slice(); SCRCPY_CONTROL_MESSAGE_TYPES_1_18.splice(6, 0, ScrcpyControlMessageType.ExpandSettingPanel); export class ScrcpyOptions1_18 extends ScrcpyOptions { static DEFAULTS = { ...ScrcpyOptions1_17.DEFAULTS, logLevel: ScrcpyLogLevel1_18.Debug, lockVideoOrientation: ScrcpyVideoOrientation1_18.Unlocked, powerOffOnClose: false, }; static SERIALIZE_ORDER = [ ...ScrcpyOptions1_17.SERIALIZE_ORDER, "powerOffOnClose", ]; get defaults() { return ScrcpyOptions1_18.DEFAULTS; } get controlMessageTypes() { return SCRCPY_CONTROL_MESSAGE_TYPES_1_18; } constructor(init) { super(ScrcpyOptions1_17, init, ScrcpyOptions1_18.DEFAULTS); } serialize() { return ScrcpyOptions1_16.serialize(this.value, ScrcpyOptions1_18.SERIALIZE_ORDER); } parseEncoder(line) { return ScrcpyOptions1_17.parseEncoder(line, /^\s+scrcpy --encoder '([^']+)'$/); } serializeBackOrScreenOnControlMessage(message) { return ScrcpyBackOrScreenOnControlMessage1_18.serialize(message); } } //# sourceMappingURL=1_18.js.map