Shaka Player Embedded
|
#include <track_list.h>
Public Member Functions | |
TrackList (media::MediaPlayer *player) | |
~TrackList () override | |
void | Trace (memory::HeapTracer *tracer) const override |
size_t | length () const |
bool | GetIndex (size_t i, RefPtr< JsTrack > *track) const |
void | Detach () |
RefPtr< JsTrack > | GetTrack (std::shared_ptr< PubTrack > pub_track) |
void | AddTrack (std::shared_ptr< PubTrack > pub_track) |
void | RemoveTrack (std::shared_ptr< PubTrack > pub_track) |
![]() | |
EventTarget () | |
void | AddEventListener (const std::string &type, Listener callback) |
void | SetCppEventListener (EventType type, std::function< void()> callback) |
void | RemoveEventListener (const std::string &type, Listener callback) |
void | UnsetCppEventListener (EventType type) |
ExceptionOr< bool > | DispatchEvent (RefPtr< Event > event) |
ExceptionOr< bool > | DispatchEventInternal (RefPtr< Event > event, bool *did_listeners_throw) |
template<typename EventType , typename... Args> | |
std::shared_ptr< ThreadEvent< bool > > | ScheduleEvent (Args &&... args) |
template<typename EventType , typename... Args> | |
ExceptionOr< bool > | RaiseEvent (Args... args) |
![]() | |
BackingObject () | |
void | Trace (memory::HeapTracer *tracer) const override |
bool | IsRootedAlive () const override |
std::string | name () const |
virtual BackingObjectFactoryBase * | factory () const =0 |
bool | DerivedFrom (const std::string &base) |
ReturnVal< JsValue > | JsThis () const |
void | SetJsThis (Handle< JsObject > this_) |
![]() | |
virtual | ~Traceable () |
virtual bool | IsShortLived () const |
Additional Inherited Members | |
![]() | |
using | Listener = optional< Callback > |
![]() | |
static void * | operator new[] (size_t size)=delete |
static void | operator delete[] (void *)=delete |
![]() | |
static constexpr const size_t | kInternalFieldCount = 2 |
![]() | |
static constexpr const uint64_t | kShortLiveDurationMs = 5000 |
![]() | |
void | AddListenerField (EventType type, Listener *on_field) |
![]() | |
~BackingObject () override | |
Stores a list of tracks. This acts as a proxy between the MediaPlayer track objects and the JavaScript wrappers of them. Subclasses will need to call AddTrack/RemoveTrack when tracks get added/removed based on the events from the MediaPlayer.
Definition at line 55 of file track_list.h.
|
inlineexplicit |
Definition at line 57 of file track_list.h.
|
inlineoverride |
Definition at line 62 of file track_list.h.
|
inline |
Definition at line 104 of file track_list.h.
|
inline |
Definition at line 88 of file track_list.h.
|
inline |
Definition at line 78 of file track_list.h.
|
inline |
Definition at line 95 of file track_list.h.
|
inline |
Definition at line 73 of file track_list.h.
|
inline |
Definition at line 110 of file track_list.h.
|
inlineoverridevirtual |
Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.
Reimplemented from shaka::js::events::EventTarget.
Definition at line 66 of file track_list.h.