I need to stream microphone to speakers simultaneously in a react native project. I've tried the LiveAudioStream & MicStream packages, but I have no idea how can I directly play the microphone stream.
Can anyone suggest me the best way to do that?
Did you try this library react-native-audio-player-recorder library ? Maybe this let you do both things at same time
Related
The purpose is to play a local video on the host side and stream it on the participants' side. The video should pause and seek for everyone when the host does it.
For this, I want to capture a stream (of MediaStream type) of a local video file while it is playing and pass it into WebRTC.
Just like on the web we have a captureStream() method to capture stream from video or canvas, do we have anything similar in react-native? Or any other way to achieve the same goal?
I could not find a relative solution with the RTCView of react-native-webrtc or the react-native-video. Any type of solution or suggestion would be helpful.
Thank you in advance.
I want to make in React Native a app that connects to a bluetooth scanner device, and receive data from it (barcodes id) after the scanned was made. It is possible? What I need to use?
Thank you!
You can scan barcodes directly from your phone and there are libraries that support such functionality for react native. However if using a bluetooth scanner device is a requirement then you have two options you can choose from -
Get access to bluetooth functionality through Native Modules
Use an existing library that provides bluetooth capabilities to react-native. A really good option can be this library https://github.com/Polidea/react-native-ble-plx
In general it is possible to achieve what you need
I am working on React-Native application. I have to play Audio using URL(podcast) source.
The UI should be like following.
I have tried react-native-video library, But, The UI is different.
https://www.npmjs.com/package/react-native-video
Is there any other library available to achieve this?
I have to show Progressbar(Slider), Play/Pause/Stop, Title. And I have to play audio in background state too.
Any suggestions?
You can use this library,
it has everything like Play audio files, stream audio from URL
https://www.npmjs.com/package/react-native-sound-player
react-native-track-player provides almost all features a audio player, you can also use it to play audio in background, used it for this app
Is there a way to create App in react native which can be used to record audio and video and save same file on both Android and iOS Devices using App?
Please help me as I am stuck.
Thank You.
I guess you can use 3 library maintained by the React Native community.
react-native-camera (for recording videos)
react-native-video (for playing video)
react-native-audio-toolkit (for recording and playing audio)
To record an audio
import {
Recorder,
} from 'react-native-audio-toolkit';
// function to start recorder
this.recorder = new Recorder(‘filename.mp4’).record();
To record video and play it, there is a really good blog post in medium
https://medium.com/react-native-training/uploading-videos-from-react-native-c79f520b9ae1
For more example, please check examples in the github pages for each library
https://github.com/react-native-community/react-native-camera
https://github.com/react-native-community/react-native-video
https://github.com/react-native-community/react-native-audio-toolkit
I need to mute the phone by pressing a button on the app. How to do it? I don't find any library for this!
According to me you should make a native module for yourself because it typically needs two native services to hit i.e setStreamVolume() and getStreamVolume().After updating the volume send event to javascript. Making native module helps you learn many things. In case you need help, i am available...
Code to mute the volume..
AudioManager am =
(AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.setStreamMute(AudioManager.STREAM_MUSIC,1);
Cheers :)