All Projects → philnash → Mediadevices Camera Selection

philnash / Mediadevices Camera Selection

Licence: mit
Examples on how to switch devices with the mediaDevices API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Mediadevices Camera Selection

Phormatics
Using A.I. and computer vision to build a virtual personal fitness trainer. (Most Startup-Viable Hack - HackNYU2018)
Stars: ✭ 79 (-36.29%)
Mutual labels:  camera, webrtc
WebRTCCTV
WebRTCCTV is a signaling server & webapp able to stream from RTSP cameras using WebRTC
Stars: ✭ 32 (-74.19%)
Mutual labels:  camera, webrtc
Instacam
Instant canvas video
Stars: ✭ 106 (-14.52%)
Mutual labels:  camera, webrtc
Meething Ml Camera
Machine-Learning powered Virtual Camera with SVG Animation (alpha)
Stars: ✭ 36 (-70.97%)
Mutual labels:  camera, webrtc
Balena Cam
Network Camera with Raspberry Pi and WebRTC. Tutorial:
Stars: ✭ 120 (-3.23%)
Mutual labels:  camera, webrtc
Cam2web
Streaming camera to web as MJPEG stream or individual JPEG snapshots. Providing embedded web UI for watching camera directly from a web browser.
Stars: ✭ 117 (-5.65%)
Mutual labels:  camera
Stun
Low-level Session Traversal Utilities for NAT (STUN) client and server
Stars: ✭ 120 (-3.23%)
Mutual labels:  webrtc
Pictureselector
Picture Selector Library for Android or 图片选择器
Stars: ✭ 11,095 (+8847.58%)
Mutual labels:  camera
Webrtc Data Channel Demo
WebRTC Data Channel demo
Stars: ✭ 116 (-6.45%)
Mutual labels:  webrtc
Xsound
Web Audio API Library for Synthesizer, Effects, Visualization, Multi-Track Recording, Audio Streaming, Visual Audio Sprite ...
Stars: ✭ 123 (-0.81%)
Mutual labels:  webrtc
Wave Share
Serverless, peer-to-peer, local file sharing through sound
Stars: ✭ 1,641 (+1223.39%)
Mutual labels:  webrtc
Rtp
A Go implementation of RTP
Stars: ✭ 120 (-3.23%)
Mutual labels:  webrtc
Webdrop
Easiest group P2P File & Message transfer in browser with WebRTC 🔥. Cross-platform alternative to Apple's AirDrop, Xender, ShareIT with the same speed over LAN. No installation, just a website :)
Stars: ✭ 119 (-4.03%)
Mutual labels:  webrtc
Alexa Ip Cam
Use Alexa's Smart Home Skill API with standalone IP cameras without needing cloud service.
Stars: ✭ 121 (-2.42%)
Mutual labels:  camera
Filegogo
A file transfer tool that can be used in the browser webrtc p2p
Stars: ✭ 117 (-5.65%)
Mutual labels:  webrtc
C4
Open IP cameras in IPv4
Stars: ✭ 123 (-0.81%)
Mutual labels:  camera
Deskreen
Deskreen turns any device with a web browser into a secondary screen for your computer
Stars: ✭ 12,014 (+9588.71%)
Mutual labels:  webrtc
Notes
let me know if my notes help you :D (it's a mess, I know)
Stars: ✭ 119 (-4.03%)
Mutual labels:  webrtc
Roll Call
📞 Free and reliable audio calls for everyone w/ browser p2p.
Stars: ✭ 1,563 (+1160.48%)
Mutual labels:  webrtc
Android
Android app for collecting OpenStreetCam imagery
Stars: ✭ 119 (-4.03%)
Mutual labels:  camera

mediaDevices Camera Selection

An example of using the mediaDevices API to choose a user's camera.

This repo now covers a couple of projects showing how to use this.

Basics on mediaDevices and camera selection

To see how to use the API with vanilla JavaScript and a basic example. Check out the blog post on choosing cameras in JavaScript with the mediaDevices API.

See it in action

You can test the basic version of this project by visiting it online here.

Run the project yourself

You should run this project on a local web server. I like to use serve for this, but you can do so as you choose.

Clone or download the repo, then change into the directory and host the files.

git clone https://github.com/philnash/mediadevices-camera-selection.git
cd mediadevices-camera-selection

If you want to use serve, you can install and use it with npm like so:

npm install
npm run serve

The page will be available at localhost:5000/index.html.

Selecting cameras during a video chat

This repo contains a modified version of the Twilio Video quickstart application with added camera selection.

Run the project yourself

Clone or download the repo, then change into the directory and install the dependencies.

git clone https://github.com/philnash/mediadevices-camera-selection.git
cd mediadevices-camera-selection
npm install

Copy the .env.template file to .env and fill in the details from your Twilio account.

Run the application with:

npm start

You can now view the application at localhost:3000. Join a room, then use the select element to change your camera. To test this with a mobile device and switch between front and back cameras, I recommend using ngrok as described below.

Viewing on a mobile device.

If you want to test this on a mobile device, you will need to make a tunnel to your local machine. I recommend you use ngrok for this. You can download and install ngrok from ngrok.com. Once you have it installed, run

ngrok http 5000

This will open a tunnel to the locally hosted project. You will get two randomly generated URLs, enter the HTTPS version into the browser in your mobile device.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].