Comments (7)
It's not currently possible to provide that.
Given how the RN JS bridge works, it would have abysmal performance even if we could get the raw audio frames to send them to userspace.
Something like Reanimated's worklets might work, but the complexity of that system would make it hard to integrate.
from react-native-webrtc.
You can't opus decode a track. A track is just a JS object. Audio data is a few layers down and not accessible.
Using react I would've possible, not because of react itself, but because when running in an actual browser you have the APIs you need to what you want, such as stream transforms.
from react-native-webrtc.
Totally looking at the other end of things, into the future.
Conversion to the new RN architecture might mean implementing things such as this would be more viable without much of the bumpy performance issues 🤔 would need some looking into though.
from react-native-webrtc.
Unfortunately that is not possible.
You might try sending audio frames via a datachannel, but due to the way the RN bridge works binary data needs to be base64 encoded so I think that overhead will add up.
from react-native-webrtc.
Thank you for your help @saghul
from react-native-webrtc.
Oh okay.
Question 1:
Could you please tell me what would happen if i tried to apply opus decoding on the tracks? Since they give me back something like this when I console.log them:
Track
{"_constraints": {}, "_enabled": true, "_muted": false, "_peerConnectionId": 0, "_readyState": "live", "_settings": {}, "id": "aafa8615-c9f9-4aca-8d3e-5f73f6330773", "kind": "audio", "label": "", "remote": true}
What would happen if I applied opus decoding to this particular Track.
Question 2:
Would it be possible to achieve what I am doing if I used React JS instead of React Native.
I really appreciate your help man @saghul.
from react-native-webrtc.
@saghul Alright but is there a way I can make an audio, being streamed/recorded from a different library such as "react-native-audio", a MediaStream track? I mean I don't want to use the getUserMedia tracks I want to send the audio using webrtc but it isn't done using the getUserMedia, since getUserMedia is the one that accesses the microphone and other media devices if im not wrong. I want to use audio from another api and i want that to be heard to the remote/local peer using react-native-webrtc
Thank you so much for cooperating! Its very helpful!
from react-native-webrtc.
Related Issues (20)
- RN 0.73+ compatibility issue: "Property 'addEventListener' does not exist on type 'RTCPeerConnection'" HOT 12
- Video doesn't resume when MediaStreamTrack is removed and added. HOT 8
- Simulcasting not working on iOS in react-native-webrtc HOT 20
- Unable to set remote description after call accepted from remote side HOT 6
- Crash occurred during webrtc connection HOT 21
- voice breaking when in speaker mode in android 9 HOT 6
- What is expected time for the support of webrtc in macOS HOT 7
- React Native WebRTC randomly crashes if audio track is enabled HOT 2
- New Architecture - Considerations/Discussion HOT 2
- ios: Needs privacy manifest for WebRTC framework HOT 5
- ios: mediaDevices.enumerateDevices() only returns wide angle camera as environment facing capture device
- Unble to render screen share (track) through RTCView HOT 2
- App crashes on Android 6.0.1 (sdk 23) java.lang.NoClassDefFoundError HOT 5
- Crash in libjingle when dialing outbound audio call HOT 11
- Expo 51 event-target-shim/package.json Package subpath './index' is not defined HOT 3
- I can't get the other user audio level in react native. HOT 1
- org.webrtc.AndroidVideoDecoder.copyI420Buffer HOT 1
- Black screen problem when calling via specific operator HOT 12
- Pod install Error after installing react-native-webrtc HOT 6
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 react-native-webrtc.