Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for region visibility with whenActive #475

Closed
pkajdas opened this issue Oct 25, 2017 · 2 comments
Closed

Question for region visibility with whenActive #475

pkajdas opened this issue Oct 25, 2017 · 2 comments

Comments

@pkajdas
Copy link

pkajdas commented Oct 25, 2017

Hi!
I'm sorry if that is a lame question, I've started fiddling with TTML not that long ago.

And to the crux of the matter, let's consider such example:

<tt
    <head>
        <styling>
            <style xml:id="regionStyle" tts:backgroundColor="#000000"/>
        </styling>
        <layout>
            <region xml:id="myregion" style="regionStyle" tts:showBackground="whenActive"/>
        </layout>
    </head>
    <body>
        <div>
            <p  xml:id="p1" region="myregion">
                <span xml:id="s1" begin="00:00:00.120" end="00:00:01.880">
                    1
                </span>
            </p>
        </div>
    </body>
</tt>

The question is, what is the intended behaviour here regarding visibility (or, being active) of the instance of myregion bound to p1 p element?
Spec (I'm using the one from https://www.w3.org/TR/ttml2/ ) says

A region satisfies the whenActive case if (1) it is a temporally active region and (2) content is selected into the region, where that content is also temporally active.

The spec also says

if the value is whenActive, then the background color of a region is rendered only when some content is flowed into the region.

Now, because there are no begin nor end attributes for p1, then does it say that instance of region bound to p1 always satisfies (1)? And is it true that it satisfies also (2) (which is equivalent to "content flowing into region" I guess?) if and only if s1 is between its begin and end attributes' values? So that, as a result, region from p1 should be visible if and only if the "1" from s1 element is visible?
I'm uncertain about satisfying point (2) above, because there is no region bound to s1 (or if there is an implicit one, then how does it relate to p1's ?).

@pkajdas pkajdas changed the title Question for region visibility Question for region visibility with whenActive Oct 25, 2017
@nigelmegitt
Copy link
Contributor

Hi @pkajdas the answer here is that the p1 <p>'s computed begin and end times are determined in this example by its child(ren), i.e. it is active from 0.120 seconds to 1.880 seconds. This comes from the SMIL definitions, which admittedly can be a little hard to follow.

The result of this is that content is only flowed into the myregion region for the time when the descendant <span> (s1) is active, and for all other times the region background is not visible.

One resource that goes through some examples of computed element times is EBU-TT Live, Tech3370 (PDF) - see Annex B. It is a constrained profile of TTML, for existence it only uses par time containers and not seq ones, but it could be helpful for you.

If this answers your question please could you close the issue?

@pkajdas
Copy link
Author

pkajdas commented Oct 27, 2017

Hi @nigelmegitt - yes, thanks for help! Closing the isssue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants