Skip to content

v0.0.20

Compare
Choose a tag to compare
@yume-chan yume-chan released this 05 Jun 03:09
· 247 commits to main since this release
d91fef0

What's Changed

All

  • Use ECMAScript private class fields syntax (supported by Chrome 74, Firefox 90, Safari 14.1 and Node.js 12.0.0).

@yume-chan/adb

  • Refactor AdbSubprocessShellProtocol class, this should improve some performance.
  • Split mode parameter in AdbSync#write() into type and permission for ease of use.
  • Add AdbReverseCommand#addExternal(). This only register the reverse tunnel to the device, the handler should already exists (for example you are adding a reverse tunnel for an external program that's already listening on the port). In ADB direct connection, this should do nothing, because the reverse tunnel is handled by this library and there is no mean of "external" handler.
  • Change AdbTcpIpCommand#setPort and AdbTcpIpCommand#disable to return or throw the response text. This can be displayed to the user to know what's wrong.
  • Add support for connecting to ADB servers. Because a USB device can only be used by one process at a time, the ADB server is the process that manages all connected devices. The server proxies and multiplexes connections from ADB clients so multiple adb commands can be executed on one device at the same time. The Adb class is no longer responsible for connecting and authenticating with ADB daemons. The AdbTransport interface and its two implementations AdbDaemonTransport and AdbServerTransport was added to connect to either ADB daemons or servers in compatible environments. Read the PR for details, migration paths, and examples. (#549)
  • Add serial field to Adb class.
  • Group product, model, device and features fields on Adb class to the banner field with type of AdbBanner.

@yume-chan/adb-credential-web

  • Change AdbWebCredentialStore to save private keys in IndexedDB, so it can be used in Web Workers. Previously saved keys in localStorage will be ignored and a new key will be generated.

adb-daemon-webusb

  • Rename package to @yume-chan/adb-daemon-webusb following the renaming of AdbDaemonTransport.
  • Rename AdbWebUsbBackend to AdbDaemonWebUsbDevice following the renaming of AdbDaemonTransport.
  • Add Support for detecting device disconnects. It no longer throws an NetworkError when the device is disconnected.
  • Add filters parameter to AdbDaemonWebUsbDeviceManager#getDevices. The filtration is manually implemented because WebUSB's getDevice API doesn't support filters.

@yume-chan/scrcpy

  • Add support for Scrcpy 2.0. New features including audio forwarding (supports PCM, AAC and OPUS encoding) and other video codecs (supports H.264 and H.265, AV1 not supported). Read the PR for new options and breaking changes. (#495)
  • Move ADB related code to @yume-chan/adb-scrcpy package. This package now only implements the Scrcpy protocol.

@yume-chan/scrcpy-decoder-webcodecs

  • Add support for decoding H.265 on supported browsers (Chrome works, Microsoft Edge with HEVC Video Extension from Microsoft Store doesn't decode H.265 correctly).

@yume-chan/stream-extra

  • Fix a bug where BufferedReadableStream#release might output duplicate data.

@yume-chan/struct

  • Rename StructDeserializeStream and StructAsyncDeserializeStream to ExactReadable and AsyncExactReadable. Rename its read method to readExactly. Add a position field so the caller can check how many bytes have been read.
  • Improve performance for decoding integers.
  • Rename Struct#fields to Struct#concat. Now Struct#fields returns an array of [name: PropertyKey, definition: StructFieldDefinition<any, any, any>] tuples.

Full Changelog: v0.0.19...v0.0.20

Note: Rush, the monorepo management tool used by this repository, only works in Git clones. Instead of downloading the attached source code tarball in this release, you must clone this repository and checkout the corresponding tag.