Re: [rtcweb] determining mic/webcam availability on page load

Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com> Mon, 23 September 2013 05:46 UTC

Return-Path: <stefan.lk.hakansson@ericsson.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E260121F9005 for <rtcweb@ietfa.amsl.com>; Sun, 22 Sep 2013 22:46:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.824
X-Spam-Level:
X-Spam-Status: No, score=-3.824 tagged_above=-999 required=5 tests=[AWL=-1.525, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9QZ8ktzgZOLv for <rtcweb@ietfa.amsl.com>; Sun, 22 Sep 2013 22:46:19 -0700 (PDT)
Received: from sesbmg20.ericsson.net (sesbmg20.ericsson.net [193.180.251.56]) by ietfa.amsl.com (Postfix) with ESMTP id AD9A121F9F50 for <rtcweb@ietf.org>; Sun, 22 Sep 2013 22:46:18 -0700 (PDT)
X-AuditID: c1b4fb38-b7fcf8e0000062b8-60-523fd5a90f72
Received: from ESESSHC004.ericsson.se (Unknown_Domain [153.88.253.125]) by sesbmg20.ericsson.net (Symantec Mail Security) with SMTP id D0.62.25272.9A5DF325; Mon, 23 Sep 2013 07:46:17 +0200 (CEST)
Received: from ESESSMB209.ericsson.se ([169.254.9.146]) by ESESSHC004.ericsson.se ([153.88.183.30]) with mapi id 14.02.0328.009; Mon, 23 Sep 2013 07:46:16 +0200
From: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
To: Harald Alvestrand <harald@alvestrand.no>
Thread-Topic: [rtcweb] determining mic/webcam availability on page load
Thread-Index: AQHOt7/sB8mnpQh9a0CUbDNpec98Cg==
Date: Mon, 23 Sep 2013 05:46:16 +0000
Message-ID: <1447FA0C20ED5147A1AA0EF02890A64B1C39585F@ESESSMB209.ericsson.se>
References: <523F3407.1060204@pocock.com.au> <523FCC86.8070302@alvestrand.no>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [153.88.183.146]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsUyM+Jvre7Kq/ZBBueuy1oc6+tis1j7r53d gcnjyoQrrB5LlvxkCmCK4rJJSc3JLEst0rdL4Mq4dPIKW8F+wYr2Ey+ZGxjb+LoYOTkkBEwk 5h49wA5hi0lcuLeerYuRi0NI4CijxP2fN1khnCWMEu3XPjKCVLEJBEps3beADcQWEdCReLi/ gQnEZhZQl7iz+BzYJGEBN4mjt38wQdS4S2zp+8UCYetJ/D25lBnEZhFQlZgy9ynYTF4BX4nN J3pZQWwhIPv1qX9gcxiBLvp+ag3UfHGJW0/mM0FcKiCxZM95ZghbVOLl43+sELaSxI8Nl1gg 6vUkbkydwgZha0ssW/iaGWKXoMTJmU9YJjCKzkIydhaSlllIWmYhaVnAyLKKkaM4tTgpN93I YBMjMB4ObvltsYPx8l+bQ4zSHCxK4rxb9M4ECgmkJ5akZqemFqQWxReV5qQWH2Jk4uCUamC8 Y7756usX15ND7hU33edqtQiYxRopvGZxhcucTwbHHhiXxc/yuTlVpGEyj1v7thlcTI+ky1Yv m3AwYqX1Mfv86DblebvPrPNtc3j96vLpQps+1XQ55laZzW+mLXArKukXZ04+aj7JKJL7kt7y TS/dm0JqT+mv4Jx9xag3MFA69ur1tclf7nYqsRRnJBpqMRcVJwIAoutjcFUCAAA=
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] determining mic/webcam availability on page load
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Sep 2013 05:46:24 -0000

On 2013-09-23 07:06, Harald Alvestrand wrote:
> On 09/22/2013 08:16 PM, Daniel Pocock wrote:
>>
>>
>> Hi,
>>
>> I'm not sure if this has been discussed before, but I think it would be
>> very useful for some applications to determine what hardware is
>> available very early, well before trying to do things like SIP
>> registration or making a call.
>>
>> However, if I use the code below, the result is that the user is
>> prompted twice for permissions, once during the initial hardware
>> detection and later when they try to make or receive a call.
>
> This is an API issue, so it should go to public-webrtc@w3.org

As this deals with access to input devices, I think the correct place is 
actually public-media-capture@w3.org

>
> But it's a solved issue in the spec, even though the implementations may
> be lagging: Use the getSourceInfos call to probe, not the getUserMedia call.
>
>
> http://dev.w3.org/2011/webrtc/editor/getusermedia.html#methods-1
>>
>> Regards,
>>
>> Daniel
>>
>>
>>
>> navigator.webkitGetUserMedia(
>>
>>    {audio: true, video: true},
>>
>>     function (stream) {
>>             var has_audio = false;
>>             var has_video = false;
>> 	  if(stream.getAudioTracks().length > 0)
>> 		  has_audio = true;
>> 	  if(stream.getVideoTracks().length > 0)
>> 		  has_video = true;
>> 	  console.log("closing unused stream");
>> 	  stream.stop();
>> 	  delete stream;
>>             checksDone(has_audio, has_video);
>>     },
>>
>>     function(err) {
>> 	  console.log(err.name + ": " + err.message);
>>             checksDone(false, false);
>>     }
>>
>> );
>>
>> _______________________________________________
>> rtcweb mailing list
>> rtcweb@ietf.org
>> https://www.ietf.org/mailman/listinfo/rtcweb
>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>