samdutton / simpl

Simplest possible examples of HTML, CSS and Javascript:
https://simpl.info
Apache License 2.0
5.18k stars 1.64k forks source link

How to use getSource with Client Application #61

Closed KrishPS closed 8 years ago

KrishPS commented 9 years ago

Hi, I am new to JavaScript. I want to get all audio & video source in client application (means without any web server e.g. apache). I used getSources API to get all devices but it doesn,t work without web-server (apache server). Could you please guide me how to get all local devices in client application (without any web-server)?

Thanks in Advance.

samdutton commented 9 years ago

Hi – you need to run getUserMedia() examples from a server.

It's easy enough to run a server locally with SimpleHTTPServer, or stacks like MAMP or XAMPP.

Alternatively, run Chrome with flags to enable calling getUserMedia() from a file:// URL: stackoverflow.com/questions/13723699/chrome-getusermedia-not-requesting-permission-locally .

Sam

On Tue, Jan 20, 2015 at 7:53 AM, KP Singh notifications@github.com wrote:

Hi, I am new to JavaScript. I want to get all audio & video source in client application (means without any web server e.g. apache). I used getSources API to get all devices but it doesn,t work without web-server (apache server). Could you please guide me how to get all local devices in client application (without any web-server)?

Thanks in Advance.

— Reply to this email directly or view it on GitHub https://github.com/samdutton/simpl/issues/61.

KrishPS commented 8 years ago

Thanks Sam