---
name: "IpcPlayerContext.isTalkBacking"
mode: "api"
versionRequirements:
  - { name: "基础库", version: "2.21.8" }
title: "IpcContext.isTalkBacking - 查询是否正在对讲"
---

## IpcPlayerContext.isTalkBacking

> [VERSION] 基础库 >= 2.21.8

### 描述

查询是否正在对讲

### 参数

`Params`

| 参数 | 类型 | 必填 | 描述 |
| --- | --- | --- | --- |
| `options` | `IpcIsTalkBackingOption` | 否 | 回调配置 |

### 返回值

无


### 引用对象

##### `interface` IpcIsTalkBackingOption

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `success` | `(result: IpcIsTalkBackingResult) => void` | 接口调用成功的回调函数 |
| `fail` | `(result: IpcFailResult) => void` | 接口调用失败的回调函数 |
| `complete` | `() => void` | 接口调用结束的回调函数（调用成功、失败都会执行） |

##### `interface` IpcIsTalkBackingResult

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `isTalkBacking` | `boolean` | 是否正在对讲 |

##### `interface` IpcFailResult

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `errorCode` | `string` | 错误码 |
| `errorMsg` | `string` | 错误信息 |


### 示例代码

#### 查询对讲状态

```ts
const ipcCtx = ty.createIpcPlayerContext('deviceId');
ipcCtx.isTalkBacking({
  success(res) {
    console.log('是否正在对讲', res.isTalkBacking);
  },
});
```
