Native Player  1.0
SubtitleListener Class Reference

This file defines SubtitleListener, MediaPlayerListener, MediaBufferingListener classes and PlayerListeners structure. More...

#include <player_listeners.h>

Inheritance diagram for SubtitleListener:

Public Member Functions

 SubtitleListener (std::weak_ptr< Communication::MessageSender > message_sender)
 
void OnShowSubtitle (Samsung::NaClPlayer::TimeTicks time, const char *text) override
 

Detailed Description

This file defines SubtitleListener, MediaPlayerListener, MediaBufferingListener classes and PlayerListeners structure.

Listener class designed to handle subtitle related events. SubtitleListener receives event's information and passes it through the communication channel using MessageSender.

Definition at line 51 of file player_listeners.h.

Constructor & Destructor Documentation

SubtitleListener::SubtitleListener ( std::weak_ptr< Communication::MessageSender message_sender)
inlineexplicit

Creates a SubtitleListener object.

Parameters
[in]message_senderAn object which will be used to send messages based on received subtitle events through the communication channel

Definition at line 57 of file player_listeners.h.

Member Function Documentation

void SubtitleListener::OnShowSubtitle ( Samsung::NaClPlayer::TimeTicks  time,
const char *  text 
)
override

An event handler method, called by the internal platform subtitle parser when a new subtitle should be presented. SubtitleListener passes delivered data through the communication channel using MessageSender.

Parameters
[in]timeDuration for which the text should be displayed.
[in]textThe UTF-8 encoded string that contains a subtitle text that should be displayed. Please note text encoding will be UTF-8 independently from the source subtitle file encoding.

The documentation for this class was generated from the following file: