---
name: "VideoContext.sendDanmu"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "VideoContext.sendDanmu - 发送弹幕"
---

## VideoContext.sendDanmu

> [VERSION] Base Library >= 2.21.8

### Description

Send bullet comments

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `option` | `SendDanmuOption` | Yes | Bullet comment options |

### Return Value

None


### Referenced Types

##### `interface` SendDanmuOption

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `string` | Yes | Danmu text |
| `color` | `string` | No | Danmu color |


### Examples

#### Send bullet comments

```ts
const videoCtx = ty.createNativeVideoContext('myVideo');
videoCtx.sendDanmu({
  text: 'Awesome!',
  color: '#FF0000',
});
```
