GithubHelp home page GithubHelp logo

Comments (7)

saghul avatar saghul commented on June 12, 2024 1

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.

saghul avatar saghul commented on June 12, 2024 1

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.

8BallBomBom avatar 8BallBomBom commented on June 12, 2024 1

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.

saghul avatar saghul commented on June 12, 2024 1

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.

sharjeelBokhari1 avatar sharjeelBokhari1 commented on June 12, 2024 1

Thank you for your help @saghul

from react-native-webrtc.

sharjeelBokhari1 avatar sharjeelBokhari1 commented on June 12, 2024

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.

sharjeelBokhari1 avatar sharjeelBokhari1 commented on June 12, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.