15 #ifndef SHAKA_EMBEDDED_JS_MSE_TEXT_TRACK_H_ 16 #define SHAKA_EMBEDDED_JS_MSE_TEXT_TRACK_H_ 20 #include <unordered_map> 36 class HTMLMediaElement;
42 explicit TextTrack(std::shared_ptr<shaka::media::TextTrack> track);
51 std::vector<RefPtr<VTTCue>>
cues()
const;
62 void OnCueAdded(std::shared_ptr<shaka::media::VTTCue> cue)
override;
63 void OnCueRemoved(std::shared_ptr<shaka::media::VTTCue> cue)
override;
66 std::unordered_map<shaka::media::VTTCue*, Member<VTTCue>> cues_;
67 std::shared_ptr<shaka::media::TextTrack> track_;
81 AddMapping(Enum::Subtitles,
"subtitles");
82 AddMapping(Enum::Captions,
"captions");
83 AddMapping(Enum::Descriptions,
"descriptions");
84 AddMapping(Enum::Chapters,
"chapters");
85 AddMapping(Enum::Metadata,
"metadata");
89 AddMapping(Enum::Disabled,
"disabled");
90 AddMapping(Enum::Hidden,
"hidden");
91 AddMapping(Enum::Showing,
"showing");
94 #endif // SHAKA_EMBEDDED_JS_MSE_TEXT_TRACK_H_
void AddCue(RefPtr< VTTCue > cue)
std::vector< RefPtr< VTTCue > > cues() const
TextTrack(std::shared_ptr< shaka::media::TextTrack > track)
void SetMode(media::TextTrackMode mode)
void RemoveCue(RefPtr< VTTCue > cue)
void Trace(memory::HeapTracer *tracer) const override
DEFINE_ENUM_MAPPING(shaka::media, TextTrackKind)
const std::string language
const media::TextTrackKind kind
media::TextTrackMode mode() const