W3C home > Mailing lists > Public > public-tt@w3.org > August 2012

RE: Re: questions on simple profile - nested spans

From: Sean Hayes <Sean.Hayes@microsoft.com>
Date: Mon, 6 Aug 2012 09:52:53 +0000
To: "Goldstein, Glenn" <glenn.goldstein@viacom.com>, "public-tt@w3.org" <public-tt@w3.org>
Message-ID: <E9A92BD0A4FC934EB7935470A46D1524091746F0@DB3EX14MBXC324.europe.corp.microsoft.com>
The idea of the single nested span in the profile is that one repeats all of the required styles on each span, so in your example you would need to specify both styles for the italic section:
<span tts:backgroundColor="#00000088">caption text here.<br/> with</span><span tts:textStyle="italics" tts:backgroundColor="#00000088">italic word</span><span tts:backgroundColor="#00000088">semi-transparent background hugging text</span>

This is less efficient from an authoring perspective, however it makes conversion from 608 easier and can simplify the processing as there is no nested state.


From: Goldstein, Glenn [mailto:glenn.goldstein@viacom.com]
Sent: 31 July 2012 10:35
To: public-tt@w3.org
Subject: Re: questions on simple profile - nested spans

i have a question on styles working across multiple spans, and nested spans in general. the simple delivery profile states:

"A document must contain only a single level of span element within a p element".

This constraint may make it difficult to support the typical CC look with with white text on a black background that hugs tight to the text. To achieve this look, i think the the tts:backgroundColor attribute needs to be on a <span> tag. if it's on the <p> tag, you get the black background as the largest constraint retangle on the mult-line caption (black background does not hug the text).

here is the structure i'm using:

<region xml:id="lowerThird"  >
        <style tts:origin="5% 5%" tts:extent="90% 90%" tts:displayAlign="after" tts:textAlign="center"
        tts:backgroundColor="transparent" tts:color="#ffffff" />
</region>

<p region="lowerThird" begin="xx" end="xx">
<span tts:backgroundColor="#00000088">caption text here.<br/> with semi-transparent background hugging text</span>
</p>

note that putting the tts:backgroundColor on the <p> tag is not good, as you then get the black rectangle not hugging the text.

this is all fine, but what if one of the words in the caption needs to be in italics? then you'd need to do nested spans, like this:
<p region="lowerThird" begin="xx" end="xx">
<span tts:backgroundColor="#00000088">caption text here.<br/> with <span tts:textStyle="italics">italic word</span>semi-transparent background hugging text</span>
</p>


this is working nicely on the TTML implementation i'm testing on xbox, but it uses nested spans. is that ok?

-glenn

Glenn Goldstein | Vice President, Media Technology Strategy | VIACOM
glenng@mtvi.com<mailto:glenng@mtvi.com> | 212-846-3210 | 1515 Broadway, New York NY 10036
[cid:image001.jpg@01CD737E.8D4FC060]





image001.jpg
(image/jpeg attachment: image001.jpg)

Received on Monday, 6 August 2012 09:53:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 August 2012 09:53:48 GMT