Closed nicosang closed 7 years ago
When media timebase is active (as is always the case with IMSC1 and EBU-TT-D), the timeline extends from 0 to +infinity. The array returned by getMediaEvents() covers this timeline in its entirety, with each element indicating the begin time of an ISD, so that last element is the begin time of the ISD ending at +infinity.
Note that some information might be displayed before the text of the first subtitle becomes active if, for instance, tts:showBackground="always"
on a region.
@palemieux When using TTML inside an ISOBMFF segment as in CMAF, the endpoints of the timeline for that segment are not 0 and infinity, but given by the time and duration of the sample that contains the TTML. I would therefore like to have the possibility to give the start and end times as parameters to the fromXML function and get events for these times instead of zero. Should I make feature request for that?
generateISD(tt, offset, errorHandler)
can be called with any value of offset
, not only the values returned by getMediaEvents()
.
So, given an ISOBMFF sample covering the interval [a, b[
, generateISD(tt, offset, errorHandler)
would be called first with offset = a
, then in turn with offset
set to each value of getMediaEvents()
that fall in the interval ]a, b[
.
Makes sense?
Yes, that should work. Thanks.
Hi,
indeed, it works for the timing question. I have an other question : it seems that regions defined but not used are drawn anyway after the call to renderHTML function. Am I right?
Thanks, Nicolas
@nicosang The initial value of tts:showBackground
is always
, i.e. the region background will always be drawn, even when no text is flowed into it.
tts:showBackground=whenActive
hides the background when no text is flowed into it.
@palemieux Thanks for the answer. You're right but I have a sample with two regions in which tts:zIndex is defined, tts:showBackground is not defined, so as you said, the value is always. In the html code, i can't see z-index definition, and in this sample, 2 regions are defined at the same area, and according to me (as you may have seen, I'm not an expert :-) ) in the wrong order....
In the html code, i can't see z-index definition, and in this sample, 2 regions are defined at the same area, and according to me (as you may have seen, I'm not an expert :-) ) in the wrong order....
IMSC1 specifies that regions shall never overlap, and thus zIndex is not used.
However perhaps the right approach is to:
Can you file a separate issue?
Once again, you're right! :-) I file, right now, a separate issue.
Hi,
I try to parse this subtitles :
<?xml version="1.0" encoding="UTF-8"?> <tt xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ebuttm="urn:ebu:metadata" xmlns:ebutts="urn:ebu:style" xml:lang="eng" xml:space="default" ttp:timeBase="media" ttp:cellResolution="32 15">
eng : 00:00:02.000
eng : 00:00:03.000
For it, I call first the function fromXML(), then I call getMediaEvents(). The returned arrays contains [0,2,3,4]. I don't understand the 0 value. Could someone help me? Perhaps, it's not an issue, just a misunderstanding... :-)
Thanks, Nicolas