WebRTC server node - node.js

I'm painfuly new to webrtc world. Have learned the essentials but when I want to build my own very simple app, I understand I'm missing a lot to start develope.
What I want?
Build a receiver audio node server that receive the audio stream and do with it something
(my main goal is sending the stream to another SIP node after adding some audio background effects, but that can wait for another time)
What the heck is my problem?
I don't know from where to start and what is the best way for me to do it right... I'm kinda lost..
There are already built webrtc servers like Kurento or Janus from one hand,
and (It sound better choice for me, but I'm not sure) some node base webrtc servers like node-webrtc, easyrtc, electron-rtc to the other hand
I also looked at the native API and it is a bit complicated and it is written in CPP that I do not master (but can learn if you guys tell me it is the best way to go)
What choice should I choose for my purpose?
I'm fairly good programmer and can cope with any lang, but still wish the easiest and best option for my purpose.
Please, if anyone was at the same phase as I'm now and passed it,
Or if you know how to help me and set me on the right track.
Please help
As you can see, I'm lost and beg for guidance.
Thank you heros of the world wide web!!

If you want someone using a browser to speak with a SIP user (or another webrtc user), then one of the easiest paths is to setup a Freeswitch server and use its 'verto' webrtc js library. See http://evoluxbr.github.io/verto-docs
The doc above will show you how to make a webrtc call to Freeswitch. You will still need to find a way for the 2nd caller to find what call/session to connect to. Ask about that on the Freeswitch users mailing list.

Related

How to integrate Node.js Server in My cocod2d-x (C++) Game

I am new in Multiplayer Game Development, I have already developed a offline game and now I want to make it a multiplayer, so with help of my friend we create a server side script in node.js, but I don't know how to integrate this in my c++ project,
I've googled but, can't find anything helpful.
anybody can suggest any tutorial.
Thanks
You've asked a big open-ended question. As Allern suggests there are a lot of things that you can do with networked programs that can extend it well beyond that of a single user game. For instance in my current game there is an access to a version welcome page in html. There are file downloads for campaign/user maps and there are connections to Firebase for leaderboards and other networked resources like ads.
However, I suspect you are referring to the communications between a number of separate user machines all synchronized to keep them coordinated. For this you will need to write some serialization code to transmit to and receive packets from the central server. Typically a serialization package like flatbuffers will be needed to move information from your data structures to a packet and the reverse.
You might also require communication/network software to asynchronously send and receive those packets (this may be included in whatever game engine you might be using). Boost.asio might help otherwise. There are numerous other networking packages and libraries all the way down to the bare-bones unix/POSIX calls (or Windows OS calls).
You will also need software on the server side to log users in, deal with players disconnecting and doing the main work of passing the game packets around. This software may also implement the logic of your game (game rules) and might do saves on the data if you want users to be able to play the game in multiple sessions (like a big dungeon crawl). There might be packages out there that do most of the server side stuff. If so, please post what you find out.
Cocos2dx does have some networking software built in but it isn't very functional as far as I'm concerned. It does have facilities to display web pages and download files fairly easy but the async communication seems a little weak. You can try the Network module in the API Docs which may have what you are looking for.
Since the type of game and how you want to implement your player interaction will dictate how the software is to be built I'm afraid this answer is a little vague. Good luck. Share your insights.
you can use public tools , as a sample is websocket,it can support C++ and javasc

What is a software solution that provides 1 on 1 video chat?

We've made an application where two people can video chat with each other using TokBox, but are running into a lot of technical issues surrounding WebRTC and TokBox itself. I know that Twilio recently launched a Javascript version for their video service, but both TokBox and Twilio seem to be aiming for larger scale publish/subscribe operations. It also isn't as far along as TokBox.
Are there other services out there that can do web video 1 on 1's? Perhaps some that don't use WebRTC and therefore don't have the problems we are facing?
I can't help but to think back to ChatRoulette and similar apps.
If what you need is an application that needs to run within the context of a browser, then WebRTC is your only choice when it comes to the technology to use. There's just nothing else there now that Flash is officially dead.
If you need it to run purely inside a packaged PC/mobile application, then you can use something other than WebRTC, but I don't really see the need for that.
When using real time video technologies, one aspect to look at closely is the quality of the network you are using. The questions I usually ask myself are things like does Skype/Hangouts/FaceTime run any better? If the answer is "yes they do", then the problem is in the implementation you have done/used. If the answer is "no, they are just as bad" then you probably can't do a lot better either.
For alternatives, you can check out the vendors listed in this WebRTC Develoepr Tools Landscape: https://bloggeek.me/webrtc-developer-tools-landscape/
I don't know what you mean with "a lot of technical issues surrounding WebRTC and Tokbox itself", but I do know Tokbox handles millions of 1:1 streaming minutes every day, without issues, and it can even handle sessions with 1 publisher and 3000 subscribers at the same time, so, maybe the technical issues are not there, but in another place...

Real time chat using laravel & redis

I just follow the steps shown in this link http://itsolutionstuff.com/post/laravel-52-chat-message-module-using-socketio-redis-express-and-nodejs-from-from-scratchexample.html to creat a real time chat it works perfictly , but this way it sends messages to all users, I want chat to be one to one.
any suggestions ?
I'm sorry, but i think you should be more specific.
I can't give you the right recipe for a good solution,
but i think you're choosing the wrong platforms to make
a messenger-chat.
Try look at NodeJS and maybe use Socket.io to communicate through.
Socket.io has an example on how to make a simple chat. You can use the example
as a starting point for your project.

Create a REST-ful api in Node.js for notifications

I'm a newbie in Node.js and after doing initial learning on Node.js, I find it rather confusing to find out any best practices. My project requires to build a real-time notification system such that, when something happens at the server side or any of the connected clients, a notification can pop up at all connected clients. I couldn't find any official recommendations on what's the best approach and tools to take. I saw there are various frameworks written in Node.js seem able to do the job, but I'm hoping some one can give me some direction.
Thank you in advance.
Start with Angularfire if you want to code less.
You can create real-time apps without a backend part like so: https://github.com/tastejs/todomvc/blob/master/examples/firebase-angular/js/app.js
Note, this is a Q&A site. Ask a question next time. "Please direct me" is not allowed to ask here.

A game library for Node with architecturally separated runner and renderer

I am building a simple game with Node. I use socket.io for communication between devices.
I want the node server to handle all the game logic; collision detection, scores ect.
The Node (socket.io) server should then send some display infomation to clients; player position, score, map size ect.
The client should also be able to send navigation commands to the server, like up and down. It might also need collision detection to avoid that you try to step out of the map ect, there is no need for us to send the navigation data then.
My question is, are there any libarys that handle this kind of logic? I know there are some game libs out there for JS, but as far I can see they are for handling the logic and rendering, and are not made to be used on a Node server.
I have used Crafty for both rendering and logic before. I am thinking that I'll draw the game with Raphaƫl.
You could maybe try the SDK from GameClosure? My understanding is that it has a lot of that sort of stuff available, though I've not used it myself.
That said, the idea of just doing everything on the server is a little bit odd. The performance and responsiveness of your game is going to become very dependent on the player's connection to the server. There are other schemes that have been implemented for many years in multiplayer game servers, which is a kind of client-side calculation with the server ensuring that the clients are doing that calculation correctly. Is there a reason it all needs to be done server-side?
I found BonsaiJS.
It's a nice Ghapic Libary with an architecturally separated runner and renderer.

Resources