How to put metadata on MediaStream when adding to RTCPeerConnection? - webrtc

I am developing a multiuser video chat application, where each user has a different role.
While listening for RTCPeerConnection.onAddStream event, I am not able to figure out the source of the mediaStream.
Is there an easy way to add metadata at the source of MediaStream, which can be helpful at the receiving end?
Presently I am solving this issue through 'signalling'. While creating the MediaStream, I share the id through socket, and at the receiving end, I figure out by comparing the ids from RTCPeerConnection.getRemoteStreams(). But the problem is, if someone joins in late, she misses the information.
Please let me know if you have any suggestion on this.

Related

Whatsapp Cloud API Save Session Attributes

I am creating a component in AWS Lambda that is responsible for receiving a WhatsApp message, retrieving the text and sending it to another system.
This other system is capable of connecting to multiple cognitive engines, recovering the user's intention and generating a correct response.
Before getting into the trouble of saving information in DynamoDB, I wanted to find out if it was possible to save a field in the Whatsapp session.
I've read the documentation and I've done a lot of research on the Postman provided by Meta and I don't see how to do it or if it's possible to do it.
Basically I need to save a session id from the other system to be able to keep up with the conversation.
I've read a lot of the documentation and I don't see anything that can help me.
API Whats App Cloud
Thank you very much for the help.

Create chat rooms in VueJS

Im creating a Queue System in Node(SocketIO) + VueJS + MySQL, but after 5 people join it has to create a new chat room (I already got the component created and a main chat) that displays only those were in the queue, I cant find a way to create another chat component, i'd like to know if there is a way to do that?
I'm stuck around 2 weeks trying to figure out how to get this.
Any extra information just ask, please I really need to know how to get this
(Rep too low to post comment, would have done so instead otherwise).
I'd suggest to hide the existence of chat rooms from the frontend, and only tell it about one chat room. The backend would have a list of many rooms and each would have at most 5 people in it.
When the frontend connects with socket.io then you can tell it about the people who are in the chatroom with them.
This means the frontend code only knows about your 5-people chatroom and not about any others. That makes the frontend-side simpler because you only have to show a single chatroom.
The trick then is to manage this correctly in the backend.
I agree with the previous answer
Just display the chat component and fetch the right data depending on the current user (for example which room he's in, and what people are with in etc...)
Hope you'll figure it out ;)

Assigning webhooks to Firebase Messaging "subscribe to topic" event

In my current project I am using the Kreait Firebase PHP SDK to send out push notifications to Android & iOS devices that have subscribed to notifications on named topics. No issues thus far. However, rather than have fixed topic names I would now like to generate topic names based on the current "condition" of the connecting device. The condition could, for example, be a geographic location.
This is not too difficult either and I have modified my app to handle this. However, in order to put the ability to have such autogenerated topics to use I need to know the topic names on my server so I can send out targeted messages via Kreait. I find Google's Firebase documentation a bit dense at times and have not been able to establish whether it is possible to assign webhooks that get called by Firebase whenever a SubscribeToTopic, UnsubscribeFromTopic event occurs.
A simple question - does FCM even offer anything like this capability? If so, any pointers to the relevant documentation would be much appreciated.
There is no public API to get a list of topic names from Firebase, nor is there a way to hook into the subscription mechanism.
Your best bet is to simply make two calls when a user subscribes to a topic: one to Firebase, and one to your own backend API that keeps a list of active topics/conditions.

How to do a persistent notification in React-Native? (Not swipeable)

I'm doing a "Uber like"app, and i want to do a persistent notification, as shown below, to let the driver know his status (connected, searching for rides, disconnected, etc). I've implemented push notifications trough Firebase, but they quite solve my problem, but it's not how i think is the best way. Does anyone know how to do that? WhatsApp implementation on what i want

Xcode - Web services and my confusion

I am having a problem here. I am totally new to this concept of servers and web services and being able to get data uploaded and retrieved on different devices, but I want to learn it, say if I want to create an app like Instagram.
But that is EXACTLY what I dont want, a link to a long tutorial on the internet on how to create the most complex app ever, I want to start slow. After doing extensive power searches on Amazon there are basically no books that will help me. So I want to start slow, here is my goal:
Get a great understanding of how web service backends and servers work and be able to apply it in other app ideas I have and want to start developing
I would like to start by being able to create an app that allows a user to enter some text into a field, it uploads to the server, another device can press a button to retrieve the text and display it in a text view.
I do not know php, and every single tutorial I have entered on this website is literal mindeff, the reason for this is because everyone has a different solution, sync web service backend with Core Data, MySQL, parse, Rails and it truly overwhelms me because I do not know which one to pick! And even worse some people provide code but I have no understanding whatsoever, and its like looking at a totally new language!
I am not asking for code, in fact that is the exact opposite. I am asking for someone to really lay out their knowledge, how does it all work? What is the best tool? Some resources and links. Nothing too complex...
I hope you can truly understand my extreme confusion and frustration. I think the reason might be is I might not be ready yet for all this, but I want to push forward and carry out my app idea!
Thank you...
Update:
I have finally decided on a web service I would like to use, it is the Amazon S3 web service, I am still not fully comprehending the full process though, any help or ideas!?
Since you wanted to create an Instagram-type app, look at this: http://www.raywenderlich.com/13511/how-to-create-an-app-like-instagram-with-a-web-service-backend-part-12
This is a good link to servers: http://www.youtube.com/playlist?list=PLC71D7CFB6AF935E6&feature=plcp. Watch the list to get an understanding of servers.
Maybe you want to read up on sql. Understanding sql will help.. Again: http://www.youtube.com/course?list=EC32BC9C878BA72085&feature=plcp. Watch the list to get an understanding of sql...
I can pass you the link and you got to do the work....
Hope this helps...