Build Ustream type application with TokBox API? - ios

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!

Related

YouTube - Third Party Ads API for Creating Ads?

Does YouTube offer an API for third party platforms for ad creation and execution? I know YouTube has an ads reporting API available through Google Ad Words but I'm trying to find if we can build an ad serving API. I searched here and found someone said no but I can find little info on why or where they got this info.
The use case is for clients to create and launch YouTube ads from a third party platform via an API connection.
As far as Google Ads is concerned, you cannot build or mutate any video campaigns over an API. This has been an ongoing feature request for about as long as video campaigns first were introduced, but is still not available. See the latest answer on one of many corresponding threads in the Ads API forum.
Of course, you can also buy YouTube inventory over DV360. The current APIs (namely the obsolete BidManager API and the newer DV360 API) currently do not support the creation of TrueView line items, but there is write functionality in closed beta that should eventuelly support this use case. I'm not aware of any timeline for general availability, though.

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)

TokBox (OpenTok) Let users call each other using

Using any of the OpenTok client SDKs, is it possible to call from one client to an other client, and make it look like similar to a "real" phone call?
I understand that a user X and user Y can join the same "room" if they both know the name of the room. But I don't understand how user X can send signals, to notify user Y to join a specific room, how is this done? I want it to work cross platform, i.e, work on iOS, Android devices, and web pages. My use cases are:
- app to browser
- browser to app
- app to app
- browser to browser
Is it possible in all of my use cases? Which are possible?
Is it possible to use OpenTok in a mobile app to show an incoming call even though the app is in the background (like how facebook messager and whats app works)
I've gone trough the tutorials on Tokbox website and successfully got them working, but I can't find a way to let different users notify each other to join a session (neither in a peer-to-peer way, or via a server). How should this be done?
I cannot find that this functionality is provided by another player such a Twilio either.
Thanks in advance,
Let's OpenTok do its job. In other words, use OpenTok to actually start a video session. All these things that you talked can be handled WITHOUT OpenTok, like REST APIs or Websocket or whatever.
I used to work in a similar project. Have a server to coordinate everything (all clients connected, who call who, push notifications, etc).
Whenever A needs to call B, the SERVER will start a "room" and put A and B to talk to each other...
So, don't mix the things. Let your server orchestrate everything and use OpenTok for video. It's designed for this purpose.

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

What is the limit for number of subscribers to a stream(publisher's) in opentok/tokbox iOS SDK?

Hi iCoders currently i'm working on an app for live streaming using OpenTok/TokBox iOS SDK.My doubt is how many number of subscribers can subscribe to a stream published by a publisher.I have searched about this in openTok forums but no where found about this.If anyone know about this please share your answer.
Thanks,
ravi.
I believe there is no limitation in how many subscribers you have on a published stream. The only thing you need to consider is using relayed or routed sessions, see doc.
If you are using relayed sessions you are limited with the bandwidth on the device. And you will open a stream to each subscriber. I guess that is not something you would like.
If you switch to routed sessions you will only have one stream to the servers of TokBox and this server replicates to all subscribers and this server is not limited to the amount of subscribers.

Resources