Twilio Chat - can we use the npm package `twilio-chat` on server side? - npm

I am trying an approach to encapsulate Twilio to our back end and using our own web socket for real-time chat experience.
Can I use twilio-chat behind my web socket as a proxy server?

Twilio developer evangelist here.
twilio-chat is built as a browser based SDK and consequently relies on browser platform APIs, most notably web sockets. Node.js does not have a native or standard library implementation of web sockets, so you would have to polyfill them and likely other APIs into the global scope.
What I'm saying is that it's likely possible, but probably a hassle.

Related

Best method if Odoo and mobile app communication

We wanted to create a mobile app using flutter, I searched on how to connect odoo with external platforms or apps , I found there are two solutions:
The most common and standard one is to use the xmlrpc communication protocol, we did found some libraries with that name in flutter , but the problem with this is that it's a bit complicated for flutter devs that does not know how the Odoo architecture works.
The least common method is the endpoints or controllers method, basically you create endpoints in your controllers and just call it through http request from the mobile side, the problem with this method is that it's not standard and I did not see much people talk about it, I also heard that this method is for the web instead of mobile apps since the session_id of the identification is returned in the Cookies.
My question is the following, is the endpoint method good enough for mobile app? If no, are their any alternative of xmlrpc?
You can connect odoo with the flutter app using simple RESTful API requests, there are many packages in pub.dev which can help you

How I make live video chat for my website

I want to add video chat option in my website please guide me how i do this task and what should i required for doing this.How much it's cost if i will make it for my website and also it's maintenance(Like server ETC).
You are looking for something like rtchub.com
If you want it free, you can develop it yourself, using WebRTC:
WebRTC is a free, open project that provides browsers and mobile
applications with Real-Time Communications (RTC) capabilities via
simple APIs. The WebRTC components have been optimized to best serve
this purpose.
See WebRTC Tutorial
On client side you use JavaScript (jQuery), and clients communication directly using browser, but you need server part and signaling mechanism, and you can use for example SignalR or Node.js.
As example you can look at my site: SignalRTC.
P.S. WebRTC works only on selected browsers, for example Chrome, FireFox, unfortunately not on IE or Edge.

Signalling channel for WebRTC

I want to create my own video chat application. I use the WebRTC framework. I read a few tutorials and each of theme assumes that signalling channel exists. How to implement my own signalling channel?
Since signalling is not defined for the WebRTC standard at the moment, it leaves you a few options. Check out this article for more info the following articles:
Signalling Options for WebRTC Applications
Choosing your signalling protocol
1.SIP over WebSockets
Companies like JSSIP offer a SIP signalling framework over Javascript. The advantage here is that it's interoperable with the usual VoIP structures.
JSSIP
SIPJS
SIPML5
2.The WebRTC Data Channel
Uncharted territory but viable!
Tutorial by Pusher
3.XMPP
If you take this route, it is probably either because you have an existing XMPP installation
Jingle
4.JSON over COMET or WebSockets
My favourite! WebRTC signalling shouldn't be done any other way than the Web way.
Matrix
Firebase
I hope this helps!
You can make a Node.js WebSocket server or other WebSocket server to broker the connection. Here is a simple guide that gets the first client talking to the server. An alternative is PeerJS, which can handle the signaling and alleviate most of the complexity of setting up the WebRTC call.
With serverless options available, vanilla HTTP AJAX options may not be bad for scalability and costs.
Create a plain HTTP(s) API exchanging information using JSON.

Can I use a MobileFirst app without the MobileFirst server?

Can I consume a web service in a MobileFirst application without a MobileFirst server?
Yes, you can use your MobileFirst app without the need to connect to a MobileFirst server.
The drawback of not using the MobileFirst server is that you'll be loosing all of the features it provides like authentication, security, adapters, unified push notifications, direct update (for hybrid), remote disable, and other features.
If you want to make a request to any endpoint you can use WLResourceRequest (available from version 7.0 onwards) or any other native method to make HTTP requests.
Information on how to use WLResourceRequest
Android:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjava-worklight-android-native/html/com/worklight/wlclient/api/WLResourceRequest.html
Hybrid:
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjavascript-client/html/WLResourceRequest.html?cp=SSHS8R_7.0.0%2F9-0-0-1-31
iOS: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refobjc-worklight-ios/html/interface_w_l_resource_request.html%23a004749b662c6f4a55a3b76e47f7e6062?lang=en
If the call is for example to an external resource you can use the same plain regular AJAX calls as you would anywhere else.
If the resource is protected by MobileFirst Platform, then you must use adapters. Adapters must go through the MobileFirst Server.
Use it like simple IDE to develop application(Native and hybrid).You can use client side API also that do not connect to the mobilefirst server.
You cannot use a mobile first app if you are using MF 7.0 or higher without a server, as soon as you launch the app it invokes an authorization request something like following:
<< domain >>/<< context >>/authorization/v1/clients/instance
Which connects to your workflight server and if it doesnt get response it will fail.
As far as invoking a web service is concerned that is just javascript if you are doing hybrid you can use AJAX as mentioned in another answer. If you are building native IOS or Android you can invoke http request using sdk libraries.
Cheers !

Can I create a Hangout "client" program? (kind of Google TalkAbout)

As stated in the Google Talk for Developers site, you can use the provided APIs to build a client that connects to the Google Talk service.
I would like to know if it's possible (or it will be in the near future) to build a similar client to the google hangouts.
What we pretend is to build something similar to cloud print, that provides printing services to the cloud, but for audio/video streaming: a camera and microphone would replace the
printer.
Thanks a lot.
Talk and all the XMPP stuff is going to be put down soon.
The new Hangouts infrastructure is proprietary. It only has API to integrate Hangouts into web pages and applications, but no API or protocol to create an alternative Hangouts client software.
https://github.com/tdryer/hangups is a library that does exactly that, with a command-line client for Linux.
https://github.com/xmikos/qhangups is a PyQt-based cross-platform app that aims to provide an open-source alternative to the Chrome-based official desktop app. Unfortunately it's not working at the time of posting, but the author is investigating the issue.