W3C home > Mailing lists > Public > public-media-capture@w3.org > January 2013

Visibility of class names redux

From: Harald Alvestrand <harald@alvestrand.no>
Date: Mon, 14 Jan 2013 13:56:40 +0100
Message-ID: <50F40088.4070809@alvestrand.no>
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
Hello folks,
let's take a break from the high level architectural issues and go for a 
detail... but a detail that someone encountered in practice.

Here's the bug report I got:

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11

Steps to reproduce the problem:
1. Construct a LocalMediaStream using getUserMedia()
2. Evaluate "stream.constructor" in developer console
3. Notice output reads "function LocalMediaStream() { [native code] }"
4. Evaluate "stream.constructor === LocalMediaStream" in developer console.
5. Notice code throws "[Exception: ReferenceError: LocalMediaStream is not defined]"

The same is true for other WebRTC types such as "MediaStream", "MediaStreamTrack" etc.

What is the expected behavior?
stream.constructor === LocalMediaStream should return true

Well, should it?
Note: Mozilla and Chrome evidently have opposite behaviours here. No 
matter which way we go on this one, the behaviour between them should be 

Received on Monday, 14 January 2013 12:57:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:24:38 UTC