html5 - Chrome getUserMedia Not Requesting Permission Locally -


i'm attempting play around navigator.getusermedia in chrome; however, not requesting permission when served locally (file:///whatever/index.html), on jsfiddle ( http://jsfiddle.net/ebsvq/ ) , other sites.

does know reason this? need somehow reset permissions?

here using locally:

<html> <head></head> <body>    <button id="btn">start</button>  <script type="text/javascript">    /*! jquery v1.8.3 jquery.com | jquery.org/license */    //jquery goes here </script>  <script type="text/javascript">   navigator.getusermedia = navigator.webkitgetusermedia || navigator.getusermedia;    $(function(){     $('#btn').click(function(){       navigator.getusermedia({audio: true},        function(){         alert('success');       },       function (err) {         alert('fail: ' + json.stringify(err));       }); }); });       </script>   </body> </html> 

chrome blocks lot of stuff on file:/// uris without reporting security error (eg. geolocation). best option run local webserver, if have python installed try simplehttpserver.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -