Closed technasir closed 4 years ago
For React Native we use this code (import ConnectyCube from 'react-native-connectycube'
):
https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/master/RNVideoChat/src/services/call-service.js#L94
The switchMediaTracks is used for other JS projects (import ConnectyCube from 'connectycube'
).
We use one codebase for all platforms (JS, NodeJS, Cordova, React Native, NativeScript).
I see that we have not docs for the switch cameras in RN. We will add. Thank you!
There is also this line of code that is used in the connectycube react native code sample that i can't find in the docs: https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/b318570a0e5ceef521d8234b9f22fac23ee6f842/RNVideoChat/src/services/call-service.js#L75 Please add information about this too in the docs.
There is also this line of code that is used in the connectycube react native code sample that i can't find in the docs: https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/b318570a0e5ceef521d8234b9f22fac23ee6f842/RNVideoChat/src/services/call-service.js#L75
Please add information about this too in the docs.
// clear a WebRTC session by ID
clearSession(sessionId) {
delete this.sessions[sessionId];
}
Closed. Create a separate issue for a new question/problem if need.
Hi, In a peer to peer video call, when i use below code to to switch my video camera,
this.session .switchMediaTracks(constraints) .then(stream => { this.setState({localStream: stream}) }) .catch(error => {});
localStream.getVideoTracks().forEach(track => track._switchCamera());