Comments (3)
This project is not optimised for mobile devices. It may work, and it may not work. In my testing, I have seen all sorts of issue with this.
On mobile this is referred to as facing mode:
https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/facingMode
but on Desktop, this hint is meaningless.
from browser-phone.
While changing the front camera to back camera, I get the following error:
Error on getUserMedia DOMException: Could not start video source
No one else is using the webcam.
In Windows, switching the camera works fine. Whereas the above error occurs on Android.
from browser-phone.
Switch camera is now working in android as well.
We need to stop the previous mediaStreamObj before calling getUserMedia again. In switchVideoSource function add
pc.getSenders().forEach(function (RTCRtpSender) {
if(RTCRtpSender.track && RTCRtpSender.track.kind == "video") {
RTCRtpSender.track.stop();
}
});
navigator.mediaDevices.getUserMedia(constraints).then(function(newStream){
var newMediaTrack = newStream.getVideoTracks()[0];
console.log("New Media Track",newMediaTrack);
// var pc = session.sessionDescriptionHandler.peerConnection;
pc.getSenders().forEach(function (RTCRtpSender) {
if(RTCRtpSender.track && RTCRtpSender.track.kind == "video") {
console.log("Switching Video Track : "+ RTCRtpSender.track.label + " to "+ newMediaTrack.label);
//RTCRtpSender.track.stop();
RTCRtpSender.replaceTrack(newMediaTrack);
localStream.addTrack(newMediaTrack);
}
});
}).catch(function(e){
console.error("Error on getUserMedia", e.name, e.message, constraints);
});
from browser-phone.
Related Issues (20)
- Send Failed HOT 2
- Call termination HOT 1
- SSL Error HOT 3
- Only Video Call HOT 1
- Event ID HOT 1
- Softphone with browser phone HOT 3
- Browser Phone HOT 2
- Recorded video
- Image
- turn server HOT 2
- call not landing in browser phone HOT 1
- Ringtone HOT 2
- Not getting video during the 1st call HOT 2
- How to Integrate VoIp with Tragofone Softphone HOT 1
- Blank video HOT 1
- no video and audio HOT 4
- caller location HOT 1
- outgoing port range HOT 1
- Message retraction
- UDP packets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-phone.