# player.h ## **Overview** **Related Modules:** [MultiMedia\_Player](MultiMedia_Player.md) **Description:** Declares the **Player** class, which is used to implement player-related operations. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures

Data Structure Name

Description

OHOS::Media::PlayerCallback

Provides listeners for events and exception notifications that occur during media playback.

OHOS::Media::Player

Provides functions for playing online movies, offline movies, and streams, for example, playing local movies and advanced audio coding (AAC) streams.

## Enumerations

Enumeration Name

Description

OHOS::Media::PlayerSeekMode : int32_t {   OHOS::Media::PLAYER_SEEK_PREVIOUS_SYNC = 0, OHOS::Media::PLAYER_SEEK_NEXT_SYNC, OHOS::Media::PLAYER_SEEK_CLOSEST_SYNC, OHOS::Media::PLAYER_SEEK_CLOSEST,   OHOS::Media::PLAYER_SEEK_FRAME_INDEX }

Enumerates player seek modes. You can move the current playback position of the media to a given time position using the specified mode.

OHOS::Media::PlayerStates : uint32_t {   OHOS::Media::PLAYER_STATE_ERROR = 0, OHOS::Media::PLAYER_IDLE = 1 << 0, OHOS::Media::PLAYER_INITIALIZED = 1 << 1, OHOS::Media::PLAYER_PREPARING = 1 << 2,   OHOS::Media::PLAYER_PREPARED = 1 << 3, OHOS::Media::PLAYER_STARTED = 1 << 4, OHOS::Media::PLAYER_PAUSED = 1 << 5, OHOS::Media::PLAYER_STOPPED = 1 << 6,   OHOS::Media::PLAYER_PLAYBACK_COMPLETE = 1 << 7 }

Enumerates player states.