Shaka Player Embedded
Classes | Public Member Functions | Public Attributes | List of all members
shaka::media::TextTrack Class Reference

#include <text_track.h>

Inheritance diagram for shaka::media::TextTrack:
shaka::media::ios::AvTextTrack

Classes

class  Client
 
class  Impl
 

Public Member Functions

 TextTrack (TextTrackKind kind, const std::string &label, const std::string &language, const std::string &id)
 
virtual ~TextTrack ()
 
 TextTrack (const TextTrack &)=delete
 
TextTrackoperator= (const TextTrack &)=delete
 
 TextTrack (TextTrack &&)=delete
 
TextTrackoperator= (TextTrack &&)=delete
 
virtual TextTrackMode mode () const
 
virtual void SetMode (TextTrackMode mode)
 
virtual std::vector< std::shared_ptr< VTTCue > > cues () const
 
virtual std::vector< std::shared_ptr< VTTCue > > active_cues (double time) const
 
double NextCueChangeTime (double time) const
 
virtual void AddCue (std::shared_ptr< VTTCue > cue)
 
virtual void RemoveCue (std::shared_ptr< VTTCue > cue)
 
void AddClient (Client *client)
 
void RemoveClient (Client *client)
 

Public Attributes

const TextTrackKind kind
 
const std::string label
 
const std::string language
 
const std::string id
 

Detailed Description

This defines a text track that stores text cues. This type can be subclassed to provide additional behavior, or can be used as-is as a list of cue objects.

This type is internally thread-safe.

Definition at line 86 of file text_track.h.

Constructor & Destructor Documentation

§ TextTrack() [1/3]

Doxygen_Skip shaka::media::TextTrack::TextTrack ( TextTrackKind  kind,
const std::string &  label,
const std::string &  language,
const std::string &  id 
)

Definition at line 41 of file text_track_public.cc.

§ ~TextTrack()

shaka::media::TextTrack::~TextTrack ( )
virtual

Definition at line 33 of file text_track.cc.

§ TextTrack() [2/3]

shaka::media::TextTrack::TextTrack ( const TextTrack )
delete

§ TextTrack() [3/3]

shaka::media::TextTrack::TextTrack ( TextTrack &&  )
delete

Member Function Documentation

§ active_cues()

std::vector< std::shared_ptr< VTTCue > > shaka::media::TextTrack::active_cues ( double  time) const
virtual
Returns
The list of cues that should be displayed at the given time.

Definition at line 62 of file text_track_public.cc.

§ AddClient()

void shaka::media::TextTrack::AddClient ( Client client)

Adds the given client to receive calls for events.

Definition at line 103 of file text_track_public.cc.

§ AddCue()

void shaka::media::TextTrack::AddCue ( std::shared_ptr< VTTCue cue)
virtual

Adds the provided cue to the list of cues in the text track.

Definition at line 86 of file text_track_public.cc.

§ cues()

std::vector< std::shared_ptr< VTTCue > > shaka::media::TextTrack::cues ( ) const
virtual
Returns
The list of cues in the text track.

Definition at line 57 of file text_track_public.cc.

§ mode()

TextTrackMode shaka::media::TextTrack::mode ( ) const
virtual
Returns
The mode of the text track.

Reimplemented in shaka::media::ios::AvTextTrack.

Definition at line 46 of file text_track_public.cc.

§ NextCueChangeTime()

double shaka::media::TextTrack::NextCueChangeTime ( double  time) const

Gets the time that the active cue list should change based on the current list of cues. This will be the nearest start or end time after the given time. This allows the app to delay polling until something is expected to change. This will return Infinity if there is nothing after time.

Parameters
timeThe media time to check.
Returns
The next media time an active cue will change.

Definition at line 73 of file text_track_public.cc.

§ operator=() [1/2]

TextTrack& shaka::media::TextTrack::operator= ( TextTrack &&  )
delete

§ operator=() [2/2]

TextTrack& shaka::media::TextTrack::operator= ( const TextTrack )
delete

§ RemoveClient()

void shaka::media::TextTrack::RemoveClient ( Client client)

Removes the given client from receiving calls for events.

Definition at line 108 of file text_track_public.cc.

§ RemoveCue()

void shaka::media::TextTrack::RemoveCue ( std::shared_ptr< VTTCue cue)
virtual

Removes the given cue from the list of cues.

Definition at line 94 of file text_track_public.cc.

§ SetMode()

void shaka::media::TextTrack::SetMode ( TextTrackMode  mode)
virtual

Sets the mode of the text track.

Reimplemented in shaka::media::ios::AvTextTrack.

Definition at line 51 of file text_track_public.cc.

Member Data Documentation

§ id

const std::string shaka::media::TextTrack::id

The id string of the text track.

Definition at line 120 of file text_track.h.

§ kind

const TextTrackKind shaka::media::TextTrack::kind

The kind of the text track.

Definition at line 111 of file text_track.h.

§ label

const std::string shaka::media::TextTrack::label

The label string of the text track.

Definition at line 114 of file text_track.h.

§ language

const std::string shaka::media::TextTrack::language

The language string of the text track.

Definition at line 117 of file text_track.h.


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