Commit Graph

36 Commits

Author SHA1 Message Date
Rick Eyre
ac80b91953 Bug 983293 - Part 3: Rename the READY_STATE enum to TextTrackReadyState. r=cpearce
- This allows us to pass around ReadyState values. It also makes the type
explicit which will save us from potentially shooting ourselves in
the foot.
- I also renamed 'READY_STATE_NONE' and 'READY_STATE_ERROR' to
'NotLoaded' and 'FailedToLoad' respectively in the enum. This is to
avoid some name collision errors we were having. It also makes it more
clear where in the spec this is as these names are the spec's names
for the TextTrack enum.
2014-03-13 14:29:32 -04:00
Rick Eyre
5b8f62b638 Bug 983293 - Part 2: Move the READY_STATE enum to Track instead of HTMLTrackElement. r=cpearce
This makes more sense as the READY_STATE values in the spec are always
referred to be 'text track readiness states' not HTMLTrackElement
readiness states.
2014-03-13 13:48:09 -04:00
Rick Eyre
a57f966bb2 Bug 983293 - Part 1: Remove unused TextTrack constructor. r=cpearce 2014-03-13 13:37:31 -04:00
Rick Eyre
182d5316ee Bug 983207 - Tracks created through a TrackElement should have a default mode of 'disabled'. r=cpearce
- I've refactored the way we set modes as well, making it a part
of the TextTrack ctors.
- I've also changed TextTracks in the track tests to have their
mode set to 'hidden' in order to be able to call TextTrack::Cues.
This is correct since TextTracks with a mode of 'disabled' do not
return null for their cue lists.
2014-03-13 13:18:06 -04:00
Rick Eyre
1b31667459 Bug 882664 - Part 2: Perform sorting on TextTrackLists. r=rillian
- This implements sorting on the MediaElement's list of TextTracks as
described in: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-model
This is important as automatically positioned cues will have a line
position that is relative to their TextTrack's position in the
MediaElement's list of TextTracks.
- Added a TextTrackSource enum which all TextTracks have. This helps
distinguish where a TextTrack came from.
2014-02-27 12:47:23 -05:00
Rick Eyre
50ef0f7c31 Bug 882664 - Part 1: TextTrack should hold a ref to its TrackElement, if any. r=rillian 2014-02-27 14:07:39 -05:00
Rick Eyre
0f67bb4ee3 Bug 978163 - Part 1: Remove VTTRegionList and VTTRegion TextTrack extensions. r=rillian, r=bz
- These two parts of the spec were recently removed as they
were seen as unecessary or bad design, in the case of the
VTTRegion TextTrack extensions. See the spec bug at:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24380
2014-03-10 11:33:06 -04:00
Rick Eyre
0471b003b2 Bug 969506 - TextTrack's ActiveCues should return null of TextTrack's mode is set to 'disabled'. r=rillian 2014-02-07 13:59:26 -05:00
Rick Eyre
0bf15cf8bd Bug 881976 - Part 3: Refactor TextTrack classes. r=rillian
Change the way they store references to eachother to make more sense.
A Track will never belong to a MediaElement directly. It will always
belong to one through a TextTrackList.
2014-01-27 15:17:20 -05:00
Rick Eyre
86a0813daf Bug 881976 - Part 1: Expose TextTrack::TextTrackList to Chrome JS. r=rillian, r=bz
Our JS WebVTT implementation (vtt.js) needs access to the Track's
TextTrackList in order to compute the line position of a TextTrackCue.
Therefore, we need to expose it to chrome JS so that vtt.js can have
access to it.
2014-01-27 13:10:06 -05:00
Chris Pearce
5c90f73c73 Bug 961885 - Rename the enum entries for HTMLTrackElement.readyState, as HTMLTrackElement::ERROR is defined in some other file that can be included in unified builds, causing errors when we add more files to content/media. r=rillian 2014-01-23 17:19:34 +13:00
Rick Eyre
3c0dfcd792 Bug 957847 - Fix VTTCue crash at TextTrackCue::AddCue. r=rillian 2014-01-15 11:30:58 -05:00
Rick Eyre
70ab9a1568 Bug 865407 - Part 5: Move update display of cues code to TextTrackManager. r=bz, r=rillian 2013-12-12 12:02:17 -05:00
Rick Eyre
0f40bbdceb Bug 865407 - Part 3: Add TextTrackList::GetAllActiveCues(). r=rillian 2013-12-12 10:57:21 -05:00
Ryan VanderMeulen
ad7ccba84d Backed out 5 changesets (bug 865407) for Windows crashes.
Backed out changeset d3e7f6392670 (bug 865407)
Backed out changeset 7ba94f08b7a5 (bug 865407)
Backed out changeset 3de6e32a4346 (bug 865407)
Backed out changeset 5c0572c6727b (bug 865407)
Backed out changeset 5db43cac79f5 (bug 865407)
2014-01-10 11:50:49 -05:00
Rick Eyre
714e04f170 Bug 865407 - Part 5: Move update display of cues code to TextTrackManager. r=bz, r=rillian 2013-12-12 12:02:17 -05:00
Rick Eyre
4ca6ff109d Bug 865407 - Part 3: Add TextTrackList::GetAllActiveCues(). r=rillian 2013-12-12 10:57:21 -05:00
Andrew Quartey
0ace8395a4 Bug 882718 - Part a: Add list of newly introduced cues to TextTrackManager. r=rillian 2014-01-06 13:03:50 -05:00
Rick Eyre
7e614abbe8 Bug 921484 - Fix bugs found in TextTrack::GetActiveCues(); r=rillian
* mDirty needs to be set to false after the list has been recomputed.
* The loop that adds cues to the list doesn't work properly when the
  list has become dirty as we check if endTime < playback time and
  since we start from pos 0 we will never get past the first cue.
2013-12-13 10:09:33 -05:00
Brendan Long
edf15f09d2 Bug 882703 - Add TextTrackList change event; r=rillian,bz 2013-12-17 23:19:09 -06:00
Wes Kocher
2f2426fd1c Backed out changeset 9ca7e64ef0d0 (bug 921484) 2013-12-20 18:32:44 -08:00
Rick Eyre
e98d145e06 Bug 921484 - Fix bugs found in TextTrack::GetActiveCues(). r=rillian 2013-12-13 10:09:33 -05:00
Andrew Quartey
369e56577c Bug 893880 - Check TextTrackCueList before trying to update its cues. r=rillian 2013-10-28 22:18:35 -04:00
Andrew Quartey
6070d164e6 Bug 931453 - Ensure TextTrack's media element reference is not null. r=khuey 2013-10-28 12:32:51 -04:00
Andrew Quartey
2d494bdb0f Bug 882665 - Part b: Add list of pending text tracks to TextTrackManager. r=rillian, khuey 2013-10-25 00:14:36 -04:00
Andrew Quartey
bccdc26ea8 Bug 882665 - Part a: Add readiness state attribute to text track. r= rillian, khuey 2013-10-25 00:14:36 -04:00
Rick Eyre
37f5ae38bd Bug 920088 - TextTrackRegion's TextTrack should point at the correct TextTrack. r=rillian 2013-09-24 11:59:17 -04:00
Rick Eyre
46699b0bdf Bug 883173 - Part 3: Implement TextTrack::ActiveCues. r=cpearce, r=rillian
- Active cues now returns the subset of cues in mCueList that are valid
for the current playback time.
- Introduces new code in media element, when seeking, and in TextTrack, when
adding and removing cues, to mark the active cue list as dirty so that we know
when we might need to rebuild the list completely.
2013-06-14 16:10:36 -04:00
Rick Eyre
fecd77a25a Bug 867823 - Implement TextTrack Add/RemoveCue. r=rillian
- Updated RemoveCue to throw NotFoundError if the cue being removed is
not in the cue list.
- Updated AddCue to not add cues that are already in the list. This is
done by reference comparing.
2013-06-28 13:31:43 -04:00
Andrew Quartey
c9ac8008b9 Bug 897504 - Implement region API for Gecko. r=giles, khuey 2013-09-13 19:44:33 -04:00
Ehsan Akhgari
210ba12d7c Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-05 16:25:17 -04:00
Ehsan Akhgari
45746b149c Backed out changeset 2f15518f566e (bug 912702) because of B2G JB Emulator build bustage
--HG--
extra : rebase_source : 6c01ad3bc2f91b0e7e3edab84aedbfe064310a8b
2013-09-05 13:29:38 -04:00
Ehsan Akhgari
66abd6bfb5 Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-04 17:58:14 -04:00
Rick Eyre
75a54dece9 Bug 905320 - Fix TextTrack classes to utilize cycle collection correctly. r=khuey
We were incorrectly using the wrapper cache cycle collection macros when that
functionality was already implemented by the base classes. Therefore, we
should instead use the inherited version of the cycle collection macros.
2013-08-15 11:11:15 -04:00
Rick Eyre
0bdf09070f Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz
- Implemented WebVTTLoadListener to manage the webvtt parser.
- TextTrackCue now handles the conversion of webvtt nodes to
  anonymous content which will be displayed on the video div
  overlay.
- HTMLTrackElement manages the lifetime of the WebVTTLoadListener.
2013-06-10 08:30:00 -07:00
Ralph Giles
cc2db4daf4 Bug 833385 - Implement HTMLTrackElement and TextTrack. r=bz,Ms2ger
Add webidl interfaces and implementations of the HTML <track>
element and related TextTrack, TextTrackList, TextTrackCue,
and TextTrackCueList dom objects.

Visibility is controlled by the media.webvtt.enabled pref,
which defaults to false.

HTMLMediaElement:NewURIFromString() is hoisted to
nsGenericHTMLElement so it's available to the track
element as well.

This patch is primarily work by Dale Karp, David Humphrey
and others as Seneca College.
2013-05-22 00:14:00 +08:00