Problem with sending audio
See original GitHub issueIn prepareWebrtc function at the end I have the following code:
MediaStreamTrack.getSources(sourceInfos => {
var isFront = camera_front
console.log(sourceInfos);
let videoSourceId;
for (const i = 0; i < sourceInfos.length; i++) {
const sourceInfo = sourceInfos[i];
if(sourceInfo.kind == "video" && sourceInfo.facing == (isFront ? "front" : "back")) {
videoSourceId = sourceInfo.id;
}
}
console.log("videoSourceId:" + videoSourceId)
getUserMedia({
"audio": true,
"video":false
}, (stream) => {
streamsDone(handleId, jsep, media, callbacks, stream)
},
// TODO: add error handling
() => undefined
);
});
When “video” is true for android and when video is {optional: [{sourceId: videoSourceId}] }
for ios, audio gets transmitted, however, then I have to ask for camera permissions which I don’t want to do. When I do “video”:false, audio can be received by my app; however, it doesn’t get send.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top Results From Across the Web
11 Ways to Fix WhatsApp Voice Messages Not Working Issue
If there is not enough space, an error will appear that you cannot load the audio. So try to free up some space...
Read more >How to Fix WhatsApp Not Sending Voice Messages Issue
How to Fix WhatsApp Not Sending Voice Messages Issue · Method 1. Check Network Connection · Method 2. Try WhatsApp Official Version ·...
Read more >How to Fix It When WhatsApp Voice Messages Aren't Working
You have a volume issue. If your phone or computer's speaker isn't working or is turned too low, you won't be able to...
Read more >Troubleshoot audio and video issues on your computer or ...
Android: To ensure that audio isn't being sent to the headphone jack, plug headphones in, and then unplug them. If the problem persists, ......
Read more >WhatsApp Voice Messages Not Working? Here's What To Do
If you're playing voice messages on WhatsApp but don't hear audio output, check that your device's volume isn't low or muted. Increase your ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am still getting this issue: not able to get audio stream in rtcview please find the code below and help me.
`import React, { Component } from ‘react’; import { StyleSheet, View, Button, Text } from ‘react-native’; import * as mediasoupClient from ‘mediasoup-client’ import {RTCPeerConnection,RTCIceCandidate,RTCSessionDescription,RTCView,MediaStream, MediaStreamTrack,mediaDevices,registerGlobals} from ‘react-native-webrtc’; import io from ‘socket.io-client/dist/socket.io’; registerGlobals() class WebRtcScreen extends Component {
state = { MediaStreamx :new MediaStream() }
componentDidMount(){ navigator.mediaDevices.getUserMedia({video: true, audio: true}) .then(this.handleVideo) .catch(this.videoError)
}
handleVideo = (stream) => { this.setState({MediaStreamx:stream}) }
videoError = (err) => { console.log(err.name) }
render() { return ( <RTCView key={1} zOrder={2} objectFit=‘cover’ style={{ …styles.rtcView }}
streamURL={this.state.MediaStreamx.toURL()}/> ); } } const styles = StyleSheet.create({ rtcView: { width: 100, //dimensions.width, height: 200,//dimensions.height / 2, backgroundColor: ‘black’, }, });
export{WebRtcScreen};`
i have same issues. Anyone help me to resolve it