Unity Chat application - ios

i am currently working on a real-time chat app in Unity
and i found those platforms to work with,
Firebase : Can we send Videos efficiently ??
MatriX : https://www.ag-software.net/matrix-xmpp-sdk/
but i am not sure that we can send videos with MatriX ?
i wanted to know from your experience
what is the best way to make real-time chatting (support photos and videos sending) in Unity ?
thanks in advance

You need to find or create services where your clients can connect and:
upload files (photos, videos .etc) and get an public and downloadable URL.
send messages to other connected clients that apart from the string, also contain media metadata (.eg a list of file attachments which are actually URLs uploaded at service (1))
Now, if you cannot find a single service that supports those two then you could try to find two different ones.
here is an example of a chat console application in C#. It contains a web service and client library that is used by the console app. Instead of a console app, it could be used in a Unity app. It does not support file uploading but it can send messages between clients over web sockets.
If you were to create something yourself, instead of finding a 3rd party service, I would recommend node.js/express and socket.io for a server since its quite beginner friendly.
here is a C# client library that can listen to socket.io events from the server. It must be the same that is used in the console application I shared above.

Related

Backend for a social media application

What is the best backend service for creating a social media application? Since Parse.com is shutting down I now need to find something else, and I do not know witch backend is best for creating a social media app where users post images and videos. Any suggestions?
Use digital ocean and the open source parse server. Done me a world of God. Very flexible and has built in dashboard and push notifications

How can I get Alexa working on my iOS app?

I have been checking out the Alexa Skills kit the past few days. I have also been poring through the documentations for both the Skills kit and the Voice Service. I am just having a little hiccup trying to understand the flow. I have implemented one of amazon's sample skills (favourite colour sample) in the developer console and also wrote a sample lambda function to handle the type of response that will be delivered. Its working on the test simulator and what left is basically getting lambda running through my ios app. However I have the impression that I don't have to use the voice service. Am I wrong? I am quite confused, it would be awesome if anybody who has some more clarity could shed some light on the matter. If I get lambda working also, I think it will accept requests that are in a particular format. Where do I have to send the encoded audio to get a json response to send to the skills kit? To the Alexa Voice Service?
Also I am authenticating my app using cognito and dynamo db. If I were to use Alexa Voice Service, then it is mentioned that the user will have to also login to amazon. So do I still have to work with the login with amazon sdk? Or is there a workaround?
Based on Amazon documentation there are two ways to interact with Alexa:
Sounds like you want to implement the app thru the Companion method.
As far as the JSON goes, i am currently resolving that issue now, (will post answer once I have it resolved).
Basically you have to use AVFoundation to capture audio from iPhone and send 2 https messages to Alexa (One message with JSON Body & the second message with audio captured as body.) Bases on Documentation
Companion App
(You have a device (such as a smart speaker) that you want to add Alexa to. So, you build in support for AVS. Great! Now you need a way to authorize it and associate it with the user's account. This is the "companion app" approach. The companion app connects to your smart product and allows the user to login and authorize the speaker to use Alexa and connect to their Amazon account.)
Mobile OR Website
AVS App
(You don't have a device you need to authorize - instead you want to speak to Alexa from within your Android/Iphone application.)
Android or Iphone
You can find a swift example on github on how to implement a iOS AVS client
https://github.com/chintan1891/iOS-Alexa

How to achieve peer to peer file transfer by WebRTC

I have design a small text based chat system with signalr but I would like to provide a feature to send file from one user end to other user end. Is it possible by WebRTC ?
I got a sample code from this url, which is probably uploading file from client to server. This web site has some code for webRTC.
However, I am looking for code which will enable two users to send file to each other with real time file upload progress. So if anyone knows any website which will guide me to do it then please redirect me or discuss with code sample which I need to send file between two users.
Thanks.

Streaming video/audio from iOS device

I have read several posts here about live streaming video/audio from iOS device while user is recording. Unfortunately it seems that there is not any "good" solution.
I understand that I must have access to files while I am recording and then send files to server from which other users can watch my stream live (with a small time lag).
Working with iOS is not problem for me, I am more struggling with part where data should be handled to server and the whole processing on server.
I have several questions:
Saying just server is very vague, what "kind of" server it should be?
I understand that I must use some protocol to send data TO server and then to get data FROM server so user can watch live video, what protocol should I use?
I feel very lost with whole server side processing, what should be done with files that were sent to server?
All this seems to be very nontrivial is there any third party solution? For example what technology apps like Periscope, Ustream or Meerkat use to provide live stream feature for their users?
I would also really appreciate if possible answers would more than one word long for each question.
Please find my answers to your questions:
There is a class of software called "media servers". E.g. Wowza, Red5, Nimble Streamer, nginx-rtmp-module and a few others.
Most common protocols for sending data TO media server are RTMP and RTSP. Watching the video is done via several ones like RTMP (requires Flash installed), HLS (native for iOS, supported by Android 4+, working on some web-players), DASH (supported by some players).
No files needed, media server can process incoming live stream and handle connections from viewers.
Basically they use combination of mentioned technologies plus their own "know-how".

Build Ustream type application with TokBox API?

It's not immediately clear from their site, but can one build a one to many streaming app like Ustream using TokBox web/iOS APIs? Is it limited to just chat.
I'd want to make something that captures video from the desktop or ios device and makes that video accessible at some public URL.
Yes that is capable. OpenTok works with Publishers and Subscribers. A single Publisher can publish to a session then many users can subscribe to the publishers stream using a public access token.
Check out the API it shows what you can do with it, how it does it and even shows some good demos. There are many examples of how they have used it for online chat shows and other similar one-to-many applications.
They've also very recently released their WebRTC version which makes it definitely worth a look!

Resources