This class is designed to create and post messages from the player using the communication channel. Possible messages, which the player can send, are defined in enum MessageFromPlayer
.
More...
#include <message_sender.h>
This class is designed to create and post messages from the player using the communication channel. Possible messages, which the player can send, are defined in enum MessageFromPlayer
.
- See also
- Communication The description of
Communication
namespace provides a brief of the communication mechanism.
-
MessageFromPlayer
Definition at line 51 of file message_sender.h.
Communication::MessageSender::MessageSender |
( |
pp::Instance * |
instance | ) |
|
|
inlineexplicit |
Creates a MessageSender
object.
- Parameters
-
[in] | instance | A pointer to a module which will be used for sending messages. |
Definition at line 57 of file message_sender.h.
Communication::MessageSender::~MessageSender |
( |
| ) |
|
|
inline |
void Communication::MessageSender::BufferingCompleted |
( |
| ) |
|
Prepares and posts a message with the information that buffering has been finished, and playback is possible from this moment.
- See also
- kBufferingCompleted Main key value in the prepared message.
void Communication::MessageSender::ChangeRepresentation |
( |
StreamType |
stream_type, |
|
|
int32_t |
id |
|
) |
| |
Prepares and posts a message with the information that representation of the stream has been changed to the one defined by id.
- Parameters
-
[in] | stream_type | A type of stream which has been changed. Audio or Video. |
[in] | id | An id of current active representation. |
- See also
- kRepresentationChanged Main key value in the prepared message.
void Communication::MessageSender::CurrentTimeUpdate |
( |
Samsung::NaClPlayer::TimeTicks |
time | ) |
|
Prepares and posts a message with a new current playback position.
- Parameters
-
[in] | time | A current playback position. |
- See also
- kTimeUpdate Main key value in the prepared message.
void Communication::MessageSender::SetMediaDuration |
( |
Samsung::NaClPlayer::TimeTicks |
duration | ) |
|
Prepares and posts a message with the duration of the content.
- Parameters
-
[in] | duration | A total length in seconds of the loaded media content. |
- See also
- kSetDuration Main key value in the prepared message.
void Communication::MessageSender::SetRepresentations |
( |
const std::vector< AudioStream > & |
stream | ) |
|
Prepares and posts messages about all available audio stream representations from the provided array container. A separate message will be sent for each representation.
- Parameters
-
[in] | stream | A vector with AudioStreams. Id, bitrate and language are taken from those streams. |
- See also
- kAudioRepresentation Main key value in the prepared message.
-
AudioStream
- Note
- This method is used by the DASH type player.
void Communication::MessageSender::SetRepresentations |
( |
const std::vector< VideoStream > & |
stream | ) |
|
Prepares and posts messages about all available video stream representations from a provided array container. A separate message will be sent for each representation.
- Parameters
-
[in] | stream | A vector with VideoStreams. Id, bitrate and resolution are taken from those streams. |
- See also
- kVideoRepresentation Main key value in the prepared message.
-
VideoStream
- Note
- This method is used by the DASH type player.
void Communication::MessageSender::SetTextTracks |
( |
const std::vector< Samsung::NaClPlayer::TextTrackInfo > & |
textInfo | ) |
|
Prepares and posts messages about all subtitles' track information from a provided container. A separate message will be sent for each track information.
- Parameters
-
[in] | textInfo | A vector with a subtitles track information. Id, and language are taken from those streams. |
- See also
- kSubtitlesRepresentation Main key value in the prepared message.
void Communication::MessageSender::ShowSubtitles |
( |
Samsung::NaClPlayer::TimeTicks |
duration, |
|
|
const pp::Var & |
text |
|
) |
| |
Prepares and posts a message with the subtitle which should be presented for the given duration.
- Parameters
-
[in] | duration | A value indicating for how long the subtitle should be presented from the current moment. |
[in] | text | A subtitle content. |
- See also
- kSubtitles Main key value in the prepared message.
The documentation for this class was generated from the following file: