W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] Bandwidth media queries

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 20 May 2012 09:13:19 -0400
Message-ID: <4FB8EDEF.5090008@mit.edu>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: whatwg@lists.whatwg.org
On 5/20/12 9:04 AM, Boris Zbarsky wrote:
> On 5/20/12 5:45 AM, Paul Irish wrote:
>> Since no one mentioned it, I just wanted to make sure this thread is
>> aware
>> of the Network Information API [1], which provides
>> navigator.connection.bandwidth
>>
>> It's been recently implemented (to some degree) in both Mozilla [2] and
>> Webkit [3].
>
> As far as I can tell, the Mozilla implementation always returns Infinity
> for .bandwidth.

Oh, and the WebKit implementation you linked to sometimes returns 
whatever value the embedding set on the object (thus punting the problem 
of what to return to the embedding), and by default seems to do this, if 
I read it right:

57	unsigned int NetworkInfoClientEfl::bandwidth() const
58	{
59	    notImplemented();
60	    return 10; // MB/s
61	}

(not exactly spec compliant, so much, of course).

-Boris
Received on Sunday, 20 May 2012 13:13:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT