# WhitePlayer Class Reference (/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Whiteboard iOS SDK 2.16.147 公开接口。

@interface WhitePlayer: WhiteDisplayer

## 成员 [#成员]

- [uuid](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/uuid)
- [phase](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/phase)
- [state](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/state)
- [timeInfo](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/timeInfo)
- [play](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/play)
- [pause](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/pause)
- [stop](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/stop)
- [playbackSpeed](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/playbackSpeed)
- [seekToScheduleTime:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/seekToScheduleTime:)
- [seekToScheduleTime\:completionHandler:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/seekToScheduleTime:completionHandler:)
- [setObserverMode:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/setObserverMode:)
- [getPhaseWithResult:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/getPhaseWithResult:)
- [getPlayerStateWithResult:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/getPlayerStateWithResult:)
- [getPlayerTimeInfoWithResult:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/getPlayerTimeInfoWithResult:)
- [getPlaybackSpeed:](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player#//api/name/getPlaybackSpeed:)

<a id="//api/name/uuid"></a>

### `uuid` [#uuid]

<ApiSignature>

@property (nonatomic, copy, readonly) NSString *uuid;

</ApiSignature>

Declared in Replayer/WhitePlayer.h

<a id="//api/name/phase"></a>

### `phase` [#phase]

<ApiSignature>

@property (nonatomic, assign, readonly) WhitePlayerPhase phase;

</ApiSignature>

```text
白板回放的阶段。详见 [WhitePlayerPhase](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/constants/white-player-phase)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/state"></a>

### `state` [#state]

<ApiSignature>

@property (nonatomic, strong, readonly, nullable) WhitePlayerState *state;

</ApiSignature>

```text
白板回放的状态。详见 [WhitePlayerState](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player-state)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/timeInfo"></a>

### `timeInfo` [#timeinfo]

<ApiSignature>

@property (nonatomic, strong, readonly) WhitePlayerTimeInfo *timeInfo;

</ApiSignature>

```text
白板回放的时间信息。详见 [WhitePlayerTimeInfo](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player-time-info)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/play"></a>

### `– play` [#-play]

<ApiSignature>

\- (void)play;

</ApiSignature>

```text
开始白板回放。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/pause"></a>

### `– pause` [#-pause]

<ApiSignature>

\- (void)pause;

</ApiSignature>

```text
暂停白板回放。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/stop"></a>

### `– stop` [#-stop]

<ApiSignature>

\- (void)stop;

</ApiSignature>

```text
停止白板回放。
*Note:** 白板回放停止后，`WhitePlayer` 资源会被释放。如果想要重新播放，需要重新初始化 `WhitePlayer` 对象。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/playbackSpeed"></a>

### `playbackSpeed` [#playbackspeed]

<ApiSignature>

@property (nonatomic, assign) CGFloat playbackSpeed;

</ApiSignature>

```text
白板回放的播放倍速，如 1.0、1.5、2.0 倍速，默认为 1.0。
 回放暂停时，返回值不会为 0。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/seekToScheduleTime:"></a>

### `– seekToScheduleTime:` [#-seektoscheduletime]

<ApiSignature>

\- (void)seekToScheduleTime:(NSTimeInterval)beginTime;

</ApiSignature>

```text
设置白板回放的起始播放位置。
 白板回放的起始时间点为 0，成功调用该方法后，白板回放会在指定位置开始播放。

 @param beginTime 开始播放位置（秒）
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/seekToScheduleTime:completionHandler:"></a>

### `– seekToScheduleTime:completionHandler:` [#-seektoscheduletimecompletionhandler]

<ApiSignature>

\- (void)seekToScheduleTime:(NSTimeInterval)beginTime completionHandler:(void(^)(WhitePlayerSeekingResult result))completionHandler;

</ApiSignature>

```text
设置白板回放的起始播放位置。
 白板回放的起始时间点为 0，成功调用该方法后，白板回放会在指定位置开始播放。

 @param beginTime 开始播放位置（秒）
 @param completionHandler 回调。 返回seek结果，详见 [WhitePlayerSeekingResult](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/constants/white-player-seeking-result)

*Note:** 如果在WhitePlayerConfig中设置了`mediaURL`，该回调会立刻返回Success
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/setObserverMode:"></a>

### `– setObserverMode:` [#-setobservermode]

<ApiSignature>

\- (void)setObserverMode:(WhiteObserverMode)mode;

</ApiSignature>

```text
设置白板回放的查看模式。

 @param mode 白板回放的查看模式，详见 [WhiteObserverMode](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/constants/white-observer-mode)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/getPhaseWithResult:"></a>

### `– getPhaseWithResult:` [#-getphasewithresult]

<ApiSignature>

\- (void)getPhaseWithResult:(void (^)(WhitePlayerPhase phase))result;

</ApiSignature>

```text
获取白板回放的阶段。

 在 `WhitePlayer` 生命周期内，你可以调用该方法获取白板回放当前所处的阶段。其中初始状态为 `WhitePlayerPhaseWaitingFirstFrame`，表示正在等待白板回放的第一帧。

 @param result 回调。返回白板回放的阶段，详见 [WhitePlayerPhase](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/constants/white-player-phase)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/getPlayerStateWithResult:"></a>

### `– getPlayerStateWithResult:` [#-getplayerstatewithresult]

<ApiSignature>

\- (void)getPlayerStateWithResult:(void (^)(WhitePlayerState * _Nullable state))result;

</ApiSignature>

```text
获取白板回放的状态。

 如果白板回放的阶段处于 `WhitePlayerPhaseWaitingFirstFrame`，则该方法返回 `null`。
 @param result 回调。返回白板回放的状态，详见 [WhitePlayerState](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player-state)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/getPlayerTimeInfoWithResult:"></a>

### `– getPlayerTimeInfoWithResult:` [#-getplayertimeinfowithresult]

<ApiSignature>

\- (void)getPlayerTimeInfoWithResult:(void (^)(WhitePlayerTimeInfo *info))result;

</ApiSignature>

```text
获取白板回放的时间信息。

 该方法获取的时间信息，包含当前的播放进度，回放的总时长，以及回放的起始时间，单位为秒。
 @param result 回调。返回白板回放的时间信息，详见 [WhitePlayerTimeInfo](/zh-CN/api-reference/whiteboard/whiteboard-sdk/ios/classes/white-player-time-info)。
```

Declared in Replayer/WhitePlayer.h

<a id="//api/name/getPlaybackSpeed:"></a>

### `– getPlaybackSpeed:` [#-getplaybackspeed]

<ApiSignature>

\- (void)getPlaybackSpeed:(void (^) (CGFloat speed))result;

</ApiSignature>

```text
设置白板回放的倍速。

 该方法获取的是播放倍速，如 1.0、1.5、2.0 倍速。因此回放暂停时，返回值也不会为 0。
 @param result 回调。返回白板回放的倍速。
```

Declared in Replayer/WhitePlayer.h
