Skip to main content
Version: next

Upgrade from 1.0.0

This page lists changes from version 1.0.0 in Scrcpy-related packages.

This version doesn't include any changes in core packages.

@yume-chan/adb-scrcpy

Move version to option classes

Because now we have an option class for each Scrcpy version (including aliases for patch versions), we moved the version info into the option classes.

The version parameter has been removed from AdbScrcpyClient.start, AdbScrcpyClient.getEncoders and AdbScrcpyClient.getDisplays.

1.0.0next
const options = new AdbScrcpyOptions2_1(
new ScrcpyOptions3_0({
// ...
})
);

const client = await AdbScrcpyClient.start(adb, path, version, options);
const options = new AdbScrcpyOptions2_1(
new ScrcpyOptions3_0({
// ...
})
);

const client = await AdbScrcpyClient.start(adb, path, options);

If you are using the matching option class for your server binary, you don't need to specify the version. Otherwise, you can override it in the option class constructor:

const options = new AdbScrcpyOptions2_1(
new ScrcpyOptions3_0(
{
// ...
},
"3.1"
)
);

@yume-chan/scrcpy

Support Scrcpy v3.1

ScrcpyOptions3_1 and related types have been added to support new options in Scrcpy version 3.1.

Accept raw values for complex options

We provided custom option value types from some complex options, for example videoCodecOptions, scid and newDisplay. Now they also accept the raw (serialized) value directly:

1.0.0next
import { ScrcpyOptions3_1, ScrcpyNewDisplay } from "@yume-chan/scrcpy";

const options = new ScrcpyOptions3_1({
newDisplay: new ScrcpyNewDisplay(1920, 1080, 330),
});
import { ScrcpyOptions3_1 } from "@yume-chan/scrcpy";

const options = new ScrcpyOptions3_1({
newDisplay: "1920x1080/330",
});

Fix incorrect scroll controllers in ScrcpyOptions1_22 and later

In ScrcpyOptions1_22 and later, the scroll controller for the mouse scroll event has been fixed.

This fixes the injectScroll control message.