Player

Imports

In Protobuf files:

import "melo/api/Player.proto";

In C++ files:

#include <melo/api/Player.pb.h>

Event

This message is used as payload for Player Event messages.

Field

Type

Label

Description

status

Status

Current player status

Request

This message is used as payload for Player Request messages.

Field

Type

Label

Description

get_status

Request.GetStatus

Get current player status (resp: Status)

control

Request.Control

Control player

seek

uint32

Seek in current media

set_volume

float

Set player normalized volume

Request.GetStatus

Message used to get current player status

Response

This message is used as payload for Player Response messages.

Field

Type

Label

Description

status

Status

Current player status

Status

This message is describing the Player status

Field

Type

Label

Description

state

State

Current player state

buffering

uint32

Percentage of buffering when player is buffering

position

uint32

Current position of the media

media

melo.api.media.Media

Media details

has_prev

bool

Play previous media in queue is possible

has_next

bool

Play next media in queue is possible

volume

float

Normalized volume

muted

bool

Player is muted

Request.Control

Enum to control the player

Name

Number

Description

PLAYER_CTRL_PLAY

0

Start / resume player

PLAYER_CTRL_PAUSE

1

Pause current media

PLAYER_CTRL_PREVIOUS

2

Play previous media in queue

PLAYER_CTRL_NEXT

3

Play next media in queue

PLAYER_CTRL_MUTE

4

Mute player

PLAYER_CTRL_UNMUTE

5

Unmute player

State

Player state.

Name

Number

Description

PLAYER_STATE_NONE

0

No media is currently loaded in the player

PLAYER_STATE_LOADING

1

A media is loading into the player

PLAYER_STATE_BUFFERING

2

The player is paused for buffering

PLAYER_STATE_PLAYING

3

The player is playing

PLAYER_STATE_PAUSED

4

The player is paused

PLAYER_STATE_STOPPED

5

The player is stopped