Re: Inband styling (was Re: Evidence of 'Wide Review' needed for VTT)

On Wed, 28 Oct 2015 18:00:49 +0900, Cyril Concolato  
<cyril.concolato@telecom-paristech.fr> wrote:

>> There is a mechanism to point to a stylesheet in HTML already -- e.g.  
>> <video><style scoped>@import ... It doesn't stream, but we don't have  
>> support for streaming CSS.
> According to http://caniuse.com/#feat=style-scoped, the feature is  
> removed from Chrome, only available in FF, not planned in IE. This does  
> not look like it's a good candidate.

Well it does what you want, it just doesn't scope the styles, but that  
doesn't really matter here. You could equally well use <link  
rel=stylesheet> and have it apply to the whole document.

> One the other hand:
> <video>
> <track src="subtiles.vtt" kind="subtitles">
> <track src="styles.vtt" kind="metadata">
> </video>
> where the styles.vtt only contains timed STYLE blocks looks more  
> promising to me.

Well this doesn't work in any browser and isn't currently planned in any  
browser, and it's not in any spec, so... But anyway, I think it's too  
early to discuss specifics on how streaming styles should work before we  
have figured out how streaming WebVTT should work in the first place, and  
before we have in-file STYLE blocks.


> Streaming CSS is almost possible today anyway, since the CSS parser  
> supports progressive loading, you can deliver CSS chunks at given times.

Hmmm. I don't think so. Browsers do progressive *parsing* of the  
stylesheet, sure, but they can't apply it until it has finished loading  
because you need the full stylesheet to correctly run the cascade etc,  
AIUI.

> The only missing part I think is unloading/removing CSS rules. That  
> problem may be overcome by keeping tracks of all styles on all elements  
> and expicitely resetting those that are not needed anymore, but that may  
> be hard to do.  The advantage of the WebVTT timed STYLES blocks would be  
> that timing explictly provided and that, once a style is not active  
> anymore, it is removed, as if the rules had not been loaded without  
> having to track styles. I don't know how hard this is to implement in  
> browsers though.

STYLE blocks would each be a separate stylesheet, and there's no problem  
with adding and removing entire stylesheets.

>>> Maybe in some cases the WebSocket approach can be useful, but there  
>>> are other issues as well like caching.
>>
>> Is caching relevant for a live stream?
> I'm not a cache expert, you'd have to ask Akamai or others. I am told  
> that all the adaptive HTTP Streaming approaches today rely on caching,  
> even on live streams. I guess caching the live stream also helps when  
> the stream is made ondemand as the caches are already populated.

OK.

-- 
Simon Pieters
Opera Software

Received on Thursday, 29 October 2015 15:53:31 UTC