-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
410 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
"libusb", | ||
"logcat", | ||
"muxer", | ||
"muxing", | ||
"MVVM", | ||
"nohostname", | ||
"nouser", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 12 | ||
--- | ||
|
||
# Reset video | ||
|
||
:::info | ||
|
||
Added in Scrcpy 3.0 | ||
|
||
::: | ||
|
||
Restart video capture and encoding. | ||
|
||
Because a video must start with a configuration and keyframe to be decoded, sometimes you might want to manually restart video capture and encoding, which produces a new configuration packet and keyframe data packet immediately. | ||
|
||
For example, when you want to [save a video](../video/record.mdx) from a specific point, or stream the video to multiple players, and a new player is added. | ||
|
||
Reset video will cause a very small pause in the video stream, but it should be acceptable for most cases. | ||
|
||
## Usage | ||
|
||
```ts transpile | ||
import { AndroidKeyEventAction } from "@yume-chan/scrcpy"; | ||
|
||
// Using `ScrcpyControlMessageSerializer` | ||
const message: Uint8Array = serializer.resetVideo(); | ||
|
||
// Using `ScrcpyControlMessageWriter` | ||
await writer.resetVideo(); | ||
|
||
// Using `AdbScrcpyClient` | ||
await client.controller!.resetVideo(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.