Re: timing model of the media resource in HTML5

On Sun, Nov 29, 2009 at 1:38 AM, Philip Jägenstedt <philipj@opera.com> wrote:
> On Wed, 25 Nov 2009 13:24:51 +0100, Philip Jägenstedt <philipj@opera.com>
> wrote:
>>
>> Comments?
>>
>
> I think one of the most difficult problems in this and other proposals (e.g.
> Silvia's <itext>, from which I've stolen many ideas) is the algorithm for
> selecting a caption/subtitle resource from many candidates. I'm quite
> skeptical towards automatic language selection because of the failure of the
> UA language setting reflected in Accept-Language. I actually think that
> having sites allow the user to set a preference cookie for language and
> possible accessibility needs is much more likely to be successful.
>

This is a whole different discussion.

>From javascript, we could use the language settings of the browser to
determine which subtitle a user will likely want to see.
Unfortunately, the javascript API for language settings has not really
been standardised and there are three different ones:
* user preference language
* browser installation language
* OS language

IE supports all three of these through navigator.userLanguage,
navigator.systemLanguage
and navigator.browserLanguage.

Safari and Chrome only support the OS language setting in navigator.language.

Firefox only supports the browser installation language setting in
navigator.language. Firefox does not expose the user preferred
language in javascript unfortunately. This is a blocker towards using
the user preference in the UA for default language settings.


So, for making a default choice, you can actually only use the HTTP
Accept-Language header. I haven't come across a situation yet where
that hadn't worked, but I keep hearing people say it failed (does
anyone have an example for that claim?).

Sure, an application should be able and allowed to overwrite the
language selection provided by the Accept-Language header with a
cookie, but I think as a default choice, the Accept-Language header
works fairly well.

Cheers,
Silvia.

Received on Wednesday, 27 January 2010 12:02:14 UTC