# MEDIA_PLAYER_STATE (/zh-CN/api-reference/rtc/cpp-all-platforms/enum-mediaplayerstate)

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

<a id="enum_mediaplayerstate__parameters"></a>

## 枚举值 [#枚举值]

<ParameterList>
<a id="player_state_idle"></a>
<Parameter name="PLAYER_STATE_IDLE">

（0）：默认状态。媒体播放器在打开媒体资源前或停止播放后处于该状态。

</Parameter>
<a id="player_state_opening"></a>
<Parameter name="PLAYER_STATE_OPENING">

（1）：正在打开媒体资源。

</Parameter>
<a id="player_state_open_completed"></a>
<Parameter name="PLAYER_STATE_OPEN_COMPLETED">

（2）：已成功打开媒体资源。

</Parameter>
<a id="player_state_playing"></a>
<Parameter name="PLAYER_STATE_PLAYING">

（3）：媒体资源正在播放中。

</Parameter>
<a id="player_state_paused"></a>
<Parameter name="PLAYER_STATE_PAUSED">

（4）：播放已暂停。

</Parameter>
<a id="player_state_playback_completed"></a>
<Parameter name="PLAYER_STATE_PLAYBACK_COMPLETED">

（5）：播放已完成。

</Parameter>
<a id="player_state_playback_all_loops_completed"></a>
<Parameter name="PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED">

（6）：循环播放已完成。

</Parameter>
<a id="player_state_stopped"></a>
<Parameter name="PLAYER_STATE_STOPPED">

（7）：播放已停止。

</Parameter>
<a id="player_state_failed"></a>
<Parameter name="PLAYER_STATE_FAILED">

（100）：媒体播放器播放媒体资源失败。

</Parameter>
</ParameterList>
