Audio Stream WiFi to WiFi - Broadcast - ios

I have a requirement for an IOS app where a user will start the app, records an audio speech (via device microphone) which would be broadcast to other user on the same network, all this has to be live over wireless connection(WIFI).
I did some research for possible solutions and also tried audio streaming via HTTP URL, but it was not feasible and also involves internet.
I'm looking for your opinions and if it's doable then what is the right approach, (what libraries and API's should I look for)
I'm novice to iOS development, i would really appreciate if you could explain in detail.
Thanks in advance.

Yes, it is doable. You will need two major components: A network API to send/receive data , and audio capture and playback API.
For network library, you can try CocoaAsyncSocket. It is quite simple to use.
You can use UDP protocol with multicast address. Even thought you said you wanted to broadcast, but you would be better off using multicast ( send to a group of devices).
For Audio sample how to capture and playback, check out my answer on this .

Related

Video Streaming and Broadcasting using WebRTC

I am very new to Real Time Protocols and I had some questions about how WebRTC works and how I can implement it. I am trying to create a one to many livestream like facebook or periscope, where one user broadcasts and other users join and stream the video. I am using Swift from my client end.
My questions are:
How do I broadcast a video using WebRTC
Is there an SDK for WebRTC in Swift/iOS
I know the questions are very vague but a guidance to the right direction would be great because I am not sure where to start
You will need to use backend servers for that.
If you plan on broadcasting to multiple users directly from your mobile app then stop...
You need to connect your mobile app to a backend media server which then can be used to broadcast the video to a larger audience.
There are several commercial and open source alternatives that enable you to do that. I'd check Red5Pro, Wowza, SwitchRTC, Jitsi, Janus and Kurento for this task.
For the client side, look at react-native-webrtc
You can find more tools for WebRTC developers here.
Regarding your question (2), there's also a SDK for iOS here and a neat get-started-page here (although 2.5ys old, but I haven't found anything better so far yet)

Audio streaming between 2 devices via bluetooth/wifi?

I need help making an app that works over bluetooth/wifi. I prefer using bluetooth since there won't be no lags.
Basically, what I want the app to do is stream audio from one device to another device. It has to be accurate.
Any help?(I am willing to pay for the man that helps me).
Thanks in advance!
All of the above is just the beginning. The API allows your iPhone to
stream data from the service once it is discovered and connected to,
etc. Just like the older Bluetooth spec, but simpler. In the spec’s
simplicity lies its power.
for details please have a look at LINK here.

Audio Chat + Data Stream Library for iOS

I want to build an iOS app that streams audio and some additional custom data between two users real-time. This is possible using GameKit if people are on the same network, but I haven't been able to find an SDK that can do this across the world.
Does anyone know if there is an existing service that does this?
If not, what services do you recommend for doing these two things (streaming audio and streaming data) separately?
Thanks.
WebRTC (www.webrtc.org/) has support for iOS (for audio streams, video promised later). But anyway in order to support communication for peers behind NATs - you will need your own sans, stun servers...
After looking into it, it seems that QuickBlox is able to do everything I need.

Network sniffer on iOS

I need to do video streaming to iPhone.
However, I don't have a homebrewed application playing the H.264 stream yet.
I have to understand first, how much delay there's for iPhone to receive the first packet/frame.
Anyone knows how to get some "sniffer" like WireShark on iPhone? Is it possible at all?
You can configure Fiddler as a reverse proxy and monitor the traffic from mobile devices. I don't know if this will do exactly what you want (I haven't done it in a long time) but the company I work at has analytics products for the various mobile platforms and that was the method we used to monitor their network usage.
http://www.fiddler2.com/Fiddler/help/reverseproxy.asp

Realtime Voice chat between iOS devices in same network

I'm working in app where I need to implement a simple voice functionality between two iOS devices in same network.
My doubt is about how to get audio units from master device and send over wifi or bluetooth network directly to slave device in realtime.
Some things about network communication I have done, I can transfer any NSData between devices using TCP.
Is very important to not use GK framework, because I need to connect two clients without any notification. For example, when I use GK to connect two devices, the iOS display a alert with a connection request, I need to avoid this connection request.
Currently I can do this with video, is more simple than audio.
Any ideias about the implementation of this are welcome.
Thanks.
First of all, you need learn how to capture the audio using Audio Queue Services.
Then transmit the audio data it over wifi and bluetooth and play it at the other side.
The most obvious choice for you is to use bonjour.
GameKit framework is built on top of this. You dont have to build too much on top of this for your application though. Yours is a straightforward application of bonjour.
Please refer the code for chatty if needed. Incase you need some background theory, please refer to http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/.
I have used Audio Queue Services for the same sort of project.
For Networking I am using Bonjour and it has really solved the problem of transmitting text and video.
Did a lot of workarounds to make a voice chat in wifi using Audio Queue Services but have not succeeded. I will update once I find the solution other than this.

Resources