/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
void NotifyCueAdded(TextTrackCue& aCue); void AddCues(TextTrack* aTextTrack); void NotifyCueRemoved(TextTrackCue& aCue); /** * Overview of WebVTT cuetext and anonymous content setup. * * WebVTT nodes are the parsed version of WebVTT cuetext. WebVTT cuetext is * the portion of a WebVTT cue that specifies what the caption will actually * show up as on screen. * * WebVTT cuetext can contain markup that loosely relates to HTML markup. It * can contain tags like <b>, <u>, <i>, <c>, <v>, <ruby>, <rt>, <lang>, * including timestamp tags. * * When the caption is ready to be displayed the WebVTT nodes are converted * over to anonymous DOM content. <i>, <u>, <b>, <ruby>, and <rt> all become * HTMLElements of their corresponding HTML markup tags. <c> and <v> are * converted to <span> tags. Timestamp tags are converted to XML processing * instructions. Additionally, all cuetext tags support specifying of classes. * This takes the form of <foo.class.subclass>. These classes are then parsed * and set as the anonymous content's class attribute. * * Rules on constructing DOM objects from WebVTT nodes can be found here * http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules. * Current rules are taken from revision on April 15, 2013.
*/
void PopulatePendingList();
void AddListeners();
// The HTMLMediaElement that this TextTrackManager manages the TextTracks of.
RefPtr<HTMLMediaElement> mMediaElement;
private: /** * Converts the TextTrackCue's cuetext into a tree of DOM objects * and attaches it to a div on its owning TrackElement's * MediaElement's caption overlay.
*/ void UpdateCueDisplay();
// List of the TextTrackManager's owning HTMLMediaElement's TextTracks.
RefPtr<TextTrackList> mTextTracks; // List of text track objects awaiting loading.
RefPtr<TextTrackList> mPendingTextTracks; // List of newly introduced Text Track cues.
// Contain all cues for a MediaElement. Not sorted.
RefPtr<TextTrackCueList> mNewCues;
// True if the media player playback changed due to seeking prior to and // during running the "Time Marches On" algorithm. bool mHasSeeked; // Playback position at the time of last "Time Marches On" call
media::TimeUnit mLastTimeMarchesOnCalled;
// Runs the algorithm for performing automatic track selection. void HonorUserPreferencesForTrackSelection(); // Performs track selection for a single TextTrackKind. void PerformTrackSelection(TextTrackKind aTextTrackKind); // Performs track selection for a set of TextTrackKinds, for example, // 'subtitles' and 'captions' should be selected together. void PerformTrackSelection(TextTrackKind aTextTrackKinds[], uint32_t size); void GetTextTracksOfKinds(TextTrackKind aTextTrackKinds[], uint32_t size,
nsTArray<TextTrack*>& aTextTracks); void GetTextTracksOfKind(TextTrackKind aTextTrackKind,
nsTArray<TextTrack*>& aTextTracks); bool TrackIsDefault(TextTrack* aTextTrack);
bool IsShutdown() const;
// This function will check media element's show poster flag to decide whether // we need to run `TimeMarchesOn`. void MaybeRunTimeMarchesOn();
class ShutdownObserverProxy final : public nsIObserver {
NS_DECL_ISUPPORTS
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.