Implementing Audio chat with Socket.IO and NodeJS - node.js

I have created a chat application using sails.js (node.js) and socket.IO.
I need to implement audio chat and file transfers along with it.
Could anyone help me in getting basic tutorial links for integrating WebRTC with socket.IO?
Thanks in advance.

If I were you, I would use a WebRTC library providing both the client and the server side. Check EasyRTC, SimpleWebRTC, PeerJS or others. Most libraries are implemented in Javascript and run in Node.js.
You will find tutorials in their respective websites.
I personally use PeerJS, the code and documentation are both very good, and it fully supports data channels (useful for file transfer). The only thing is that there are only 2 founders, and the community seems quite small.

I am also planning to make your kind of app on nodejs. During my research I found that WEBRTC support for mobile browsers is limited. In todays world whenever we are building a Web app we consider that a major portion of our users are going to use it on mobile phone. WebRtc is supported on android browsers like chrome, Firefox and opera. But on iPhone it doesn't support safari nor windows phone browsers.
You should take a look at Wowza streaming cloud at https://www.wowza.com/docs/wowza-streaming-cloud-free-trial

Related

Simulate WebRTC Brower using node.js

My question is kinda complex, so I think it's best to tell what I'm trying to accomplish.
My job is testing a telecommunication application. The app has a browser interface, the user can connect their phone extension to it, make and receive calls through the browser.
To test, we have a node.js Tool, that simulates the browser, sending and receiving the requests from the server instead of the browser interface. It works perfectly.
My problem is that the application also can work with WebRTC. In this case it's the browser who take care of the call, not the "physical" phone extension. SO I would need to implement the WebRTC in the test tool. How can I do that?
Most things I find in the web is to implement the server side on Node.js, while leaving the browser side, to well, the browser. But that is the part I need.
you can enable webrtc on your node js test tool just by installing webrtc package on your node js as below
npm install wrtc
follow below link if you want to understand apis and other functionalities
node-webrtc

Need suggestion for adding video conference (specially classroom / educational) in MERN stack app

I have created a web app using React, Node. I want to enable video conferencing in the app and have already integrated it with Agora and also tried others.
I have also tried using core WebRTC but nothing works so perfectly.
Agora is working fine but its UI is not customizable.
Can someone please suggest me the best option to do so.
A good solution for customization would be Mediasoup. This allows you to make an SFU and completely customize the framework to your needs. It is free and you only need to pay for your own server you deploy it on.
Here is an EXAMPLE PROJECT showing simple multi-user video conferencing with audio/video/screen sharing.
Another option would be the Janus Gateway. Haven't used it yet, but has a prebuilt backend for video/audio conferencing ready for deployment. You can then also customize the UI to your needs.

Nodejs and/or PHP mobile detection

Is there a good and reliable library or method, or whatever, that can detect if the request is coming from a mobile environment?
I found a few packages, but non seems to work properly. I am looking for a basic/simple one that is able to detect just this: isMobile; isDesktop. Needs to be reliable, up to date and working.
If there is none free, even payed solutions would be acceptable. I am not looking for 100% detection, but I expect that top most popular devices to be detected without problem.
I am looking for a nodejs (express) solution, and/or a PHP one.
For PHP you can use Mobile-detect. According to its official description in Github, Mobile_Detect is a lightweight PHP class for detecting mobile devices.
For node.js you can use mobile-detect.js. It's a port of Mobile-detect to javascript.
DeviceAtlas has a good article:
How to detect a mobile browser by Pawel Piejko.
They have examples with PHP, Java and Python and they have API to use. It is a a paid service but with free trial.
Mobile detection is a complicated problem. Of course it's easy to detect an iPhone with some client-side JavaScript, but mobile devices are not only iPhones or Android phones. And if you want to detect it before running client-side JavaScript like you need here then you cannot rely only on client-side JavaScript.
More options
General options:
WURFL, 51Degrees, OpenDDR, MobileESP, ua-parser, Detect Mobile Browsers.
Node modules:
mobile-detect,
device-detect,
detect-mobile-browser,
sniffr,
dagent,
device-detective,
ismobilejs.

How can we use Node.js with Html/Bootstrap to develop Mobile App

I want to develop Mobile App using Node.js and Html5/Bootstrap as frontend?
I searched the web , but not getting any proper source of look. I am New in Node.js , but i Know HTML5 / Bootstrap.
Can anyone Guide me through to Develop Mobile App using these two?
While this is an opinionated question/answer and shouldn't be on SO, I'll share my experience as I was in the same boat recently:
For the front-end (The app): Look up PhoneGap (Apache Cordova) to get an idea about building cross-platform mobile apps using HTML5/CSS/JS. Keep in mind that you can use a good amount of front-end frameworks to ease your workload (AngularJS, Framework7, jQuery, etc.)
For the back-end (Server): Node.js is a great start, however you'll need to code your backend almost from scratch this way. I suggest looking up "Parse Server" to use it for your backend. It's an open-source solution for mobile apps backends (MBaaS). If you still decide to code your own full backend, then I highly recommend learning MEAN stack (MonogoDB, Express.js, AngularJS, Node.js), it might take you a while, but the portable experience you'll get is huge.
Either way, if you want to make high performing apps, it's always recommended to go native (Android apps using Java and Android Studio, iOS apps using XCode and Swift)
I hope this helps,
Best of luck

Video plugin in chat.

I'm developing a social networking application for browsers using PHP and I want to have a chat application feature that supports video chat features like in Gmail (Google provides a browser plugin for this). Where can I find such an application or is there something available for a starting point for me to develop one on my own?
Thanks.
You could try using a service like ToxBox. They provide an API;
http://developers.tokbox.com/index.php/Main_Page

Resources