---
name: "VideoContext.playbackRate"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "NativeVideoContext.playbackRate - 设置倍速播放"
---

## VideoContext.playbackRate

> [VERSION] Base Library >= 2.21.8

### Description

Set playback speed

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `rate` | `number` | Yes | Speed multiplier; supports 0.5/0.8/1.0/1.25/1.5/2.0 |

### Return Value

None


### Examples

#### Set 2x playback speed

```ts
const videoCtx = ty.createNativeVideoContext('myVideo');
videoCtx.playbackRate(2.0);
```
