Video call and chat using WebRTC and Pubnub in native iOS Swift - ios

I'm working on a doctor-patient appointment app on native iOS Swift project. Here I want to implement a live video call with chat using WebRTC and PubNub signaling server. I'm totally new to it. I don't know how to implement this. I have seen some of the Objective-C codes but still I didn't understand. Please help if any of you implement the same in swift.

Highly recommend you reach out to a service such as Vonage (https://www.vonage.com) who can provide HIPAA compliant WebRTC video service for you.
Once you have a set of keys on Vonage, you can use PubNub to move the video session details around the channel in question.
Traditionally I use a JSON object model that looks like this:
channel: "UUID of medical session"
messageID: "MessageID on your platform"
messageType: "videoInvite"
sender: "Hilaj"
sessionDetails: "session JWT and/or session token"
timestamp: "1597347054"
This means you can send text based messages as well as video invites in the same channel and write the event to logs.

I have implemented this in Swift (and previously in Objective C) but it is completely proprietary.
You are going to have to download the Google WebRTC framework.
Taking a quick look at PubNub, it looks like it just does signalling. You are still going to need an actual WebRTC server (eg, Janus). There are others and I'm not really sure which ones support PubNub.

Related

Telegram API swift (or objective-c) client, to read channel messages

I'm wondering if it's possible the read messages from telegram channel from the iOS app.
I want to parse public channel to implement an application which will show a map with latest Air-Raid sirens in Ukraine. There's official channel here - https://t.me/air_alert_ua, which I'd like to parse, and then draw an overlay on the map in an iOS app, like on the following web-site.
I know that there's telethon client for python, but running python inside iOS app isn't a very good idea and perhaps there's a better way. Any help is greatly appreciated.

Is it possible to stream voice to directline API from native app on iOS using Swift or Objective-c

I have a bot that leverages all the cool tech that comes with botframework, e.g. LUIS, QnA maker, adaptivecards, etc. The bot works well and I can use WebChat to connect to and ask questions and get responses. However, I now need native iOS (and eventually Android) app that can perform much like webchat does but I do not want to embed webchat in a web control in native app. I plan to have voice always on leveraging something like snowboy or picovoice for hotword to wake app and send commands to bot - users would ask things like "hey bot what is weather in Boston" and get presented with result message or adaptivecard.
Is voice steaming to directline API from Swift on iOS possible (I know most things are possible so any pointers would be greatly appreciated)? Or am I approaching from wrong angle and perhaps there is better/easier way to achieve my goal?

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)

Draw annotation on Twilio Video Chat

I want to use twilio for Remote assistance.
Where user can share camera feed and Technician can assist by drawing annotations on the screen.
similar to the demo video on https://www.twilio.com/video
I was able to get the Video Chat running on my iOS devices.
Can you please guide me how to make annotations on one device which will be shown on the other device.
Twilio Video does not provide support for annotating videos as part of the SDK. There is also no current support for using the WebRTC data channel to send that across. You need to provide your own websocket solution for this I'm afraid.
Edit
Twilio Video does support the data channel now, under the Data Tracks API. You can see the documentation here: https://www.twilio.com/docs/video/javascript-v1-using-the-datatrack-api.
You might also consider using Twilio Sync for something like this too.

iOS - XMPP with WebRTC for realtime video call or chat

I have searched the whole web but did not get any document for passing the XMPP IQ to WebRTC. Also I see is the XMPP Jingle class, but cannot find any document for integrate this.
Can someone help me with setting up a two-way video call using XMPP and WebRTC? By providing a working sample of Objective-C code?
I have tried:
Checking https://github.com/YK-Unit/AppRTCDemo and many other Github projects.
Are you want to support different platforms to get live video streaming?
So, i have a very good experience with https://www.nanocosmos.de/ library.
It's supports iOS, Android and Web. Has demo applications and trial period.
About documentation:
XMPP Framework: https://github.com/robbiehanson/XMPPFramework/wiki/IntroToFramework
It's very good documented.
WebRTC Native Code:
https://webrtc.org/native-code/ios/
It's contains all information about WebRTC.

Resources