How to add video chat capability to my rails application? - ruby-on-rails

I've been googling about how to accomplish oneline chat for rails application and I've implemented a text chat version using Juggernaut. But for video chat, I only find flash&red5 might be a solution for me, but it's flash and java, which I'm relatively not good at. Is there a better solution?

I have researched this a little and the options are not great.
There are some nice-looking packages that cost real money. Tokbox.com, ooVoo (http://www.oovoo.com, looks free at first but free version has limits), VideoWhisper.com looks interesting -- they seem to sell a 2-way video chat package for a one-time fee, but it is PHP-based.
A simple Flash-based solution is definitely a good way to go. Flash has good video support and virtually everyone has it installed already. It's not that hard to learn enough Flash basics to do a simple 2-way video chat (see http://www.derekentringer.com/blog/fms-video-chat/ for an example of a trivial video chat script that is something like 30 lines of code). And you don't need to learn Java to use Red5 unless you want to customize it -- Red5 is the open-source video streaming server that makes it so you don't need to buy really a expensive Adobe Media Streaming server system. You just need to learn enough to set it up and get it running.
I'm certain there's an open-source or low-cost Flash script out there that handles a basic 2-way video chat, but I have yet to find it. If anyone does, please post it!

Here is a rails implementation of tokbox:
http://github.com/njacobeus/tokboxer/

Try using Raydash. There is a rails gem available at https://github.com/gersh/Raydash-Ruby-on-Rails. You just need to register at http://www.raydash.com to use it.

Related

How to design a multi platform video conference/chat app?

I am a developer who is still learning . I want to design an app which can allow multiple people to have a video conference/chats simultaneously something like zoom . I know i can design native apps like specific for Android as well as iOS but I am still learning Android development and have no idea about iOS code .I searched and found that we can have hybrid apps having React,Node.js or with Angular.js and they work on different platforms .But as I'm a newbie I need suggestions as well as guidance .what I'm expecting in my app are following things :
Should support all video resolutions and audio quality, should
work in low and high network scenarios
Should be low on usage of power/ processor
Should not have any external hardware dependency
Should work on any device
Should have chat option during conference, even the multi
people conference
Should have sign-in and non-sign-in options to join a
conference
Can be browser and/or app based interface
Should have encrypted network communication
Should have audio/ video recording feature
Should have screen/file sharing capabilities
Should allow audio to close captioning during chat
(multilingual)
Should have capabilities to host multiple concurrent
conferences having multiple participants in each conference
I know its a tedious task to involve everything I discussed but I need guidance how to do this .
I have already told my expectation so now I want to know what steps I need to do so ,How to start as well as where to start ,what language/library I should choose ,whether having a hybrid app be a good idea or should I go for native apps .As I have earlier said I am a learner so I am going to learn each and everything to get my project done ,so whether its react or node or angular or whatever experienced developer are going to suggest/guide here .I know my question may look broad or even vague but still I am asking only because I see stack-overflow as a group of supportive accomplished coders .Hope you guys will help me in getting my project done .Thank you !
OK then you have got much work to do. I will point you to some references which should give you a good start. I will try to keep this as short as possible.
As you mentioned, WebRTC is the way to go.
With WebRTC, you can add real-time communication capabilities to your
application that works on top of an open standard. It supports video,
voice, and generic data to be sent between peers, allowing developers
to build powerful voice- and video communication solutions. The
technology is available on all modern browsers as well as on native
clients for all major platforms.
This blog explains how WebRTC functions in details - https://medium.com/#anto.christo.20/understanding-web-real-time-communication-webrtc-d4cec5a43f2f
This blog explains how to build peer2peer video calling in android -
https://medium.com/#anto.christo.20/understanding-web-real-time-communication-webrtc-d4cec5a43f2f
https://webrtc.org/ also contains lot of headstart material including sample code.
Once you have done this you can add other features on top of it.
Now, this will take care of peer2peer but if you want o build a multi-user functionality from scratch there is some extra work required as mentioned in the answer - how to build multi-user video chatting web app using webRTC, node.js and socket.io

How to implement an online whiteboard facility?

I am planning to implement an online whiteboard. But I have no idea where to start. I went through many creative applications online, most of them seemed to have been implemented using Adobe Flash. Can anyone provide ideas on how to start off with the application regarding both the front-end and back-end implementation.
As a web developer I would suggest you to look at HTML5 Canvas as it allows you to draw/scribble on it. You must consider using fabric js So you would need HTML5 and javascript.
To share your whiteboard scribbling or anything you ll have to push real time data to other clients/user(aka browser), you should consider websockets , socket.io
Here this question can you help you I think. That should get you started. Let us know if you face any specific problem.

YouTube embed code on iPad

I'm working on improving the experience of a site by adding in iPad support. This includes support for videos. Our client is pushing towards a YouTube model for storing and serving videos -- great for us! I originally planned to implement the use of YouTube's new HTML5-supporting <iframe> snippets. This offloads the device detection to YouTube and makes embedding a video a cinch as we don't need to worry about compatibility. It turns out the the CMS we're using, Sitecore CMS, strips out <iframe>'s from our WYSIWYG editor. After a lot of research it looks like its a bit hard to not make this happen.
Fast forward to now... I tested out the old style <embed> code and discovered even though iOS doesn't support Flash, these embeds seem to work fine on iPad. Some Stack Overflow research led me to this post which suggests its because of the YouTube plugin /System/Library/Internet Plug-Ins/YouTubePlugIn.webplugin on iPads that allows for the playback.
My question is, is there any documentation that this is the exact reason? I'd like to go by this as why we can use the regular <embed> code but I need to back it up with proof via a document for iOS. Is this YT plug-in on every iPad by default, or do users need to manually install it? This seems like a great solution considering our unfortunate incompatibility with an <iframe> but I need to support the use of the <embed>'s with hard facts. Thanks in advance.
The answer you are looking for is to be found in Apple's URL Scheme Reference. Basically it's a mechanism that comes into play on the iDevices to detect and handle specifically, certain types of URLs - for instance Google Maps, iTunes and also YouTube.
Here's a few reference links.
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/YouTubeLinks/YouTubeLinks.html#//apple_ref/doc/uid/TP40007895-SW1
And just for good measure, you might also want to take a look at the Safari Developer Library for the best practice recommendations on HTML5 Video and Audio embedding :-)

Any good (free) text-to-speech engines out there?

I've been scouring the SO board and google and can't find any really good recommendations for this. I'm building a Twilio application and the text-to-speech (TTS) engine is way bad. Plus, it's a pain in the ass to test since I have to deploy every time. Is there a significantly better resource out there that could render to a WAV or MP3 file so I can save and use that instead? Maybe there's a great API for this somewhere. I just want to avoid recording 200 MP3 files myself, would rather have this generated programatically...
Things I've seen and rejected:
http://www.yakitome.com/ (I couldn't force myself to give them my email)
http://www2.research.att.com/~ttsweb/tts/demo.php
http://www.naturalreaders.com/index.htm
http://www.panopreter.com/index.php (on the basis of crappy website)
Thinking of paying for this, but not sure yet: https://ondemand.neospeech.com/
Obviously I'm new to this, if I'm missing something obvious, please point it out...
I am not sure if you have access to a mac computer or not. Mac has pretty advanced tts built into the operating system. Apple spent a lot of money on top engineers to research it. It can easily be controlled and even automated from the command prompt. It also has quite a few built in voices to choose from. That is what I used on a recent phone system I put up. But I realize that this is not an option if you don't have a mac.
Another one you might want to check into is http://cepstral.com/ they have very realistic voices. I think they used to be open source but they are no longer and now you need to pay licensing fees. They are very commonly used for high end commercial applications. And are not so much geared towards the home user that wants their article read to them.
I like the YAKiToMe! website the best. It's free and the voices are top quality. In case you're still worried about giving them your email, they've never spammed me in many years of use and I never got onto any spam lists after signing up with them, so I doubt they sold my email. Anyway, the service is great and has lots of features for turning electronic text into audio files in different languages.
As for the API you're looking for, YAKiToMe! has a well-documented API and it's free to use. You have to register with the site to use it, but that's because it lets you customize pronunciation and voice selection, so it needs to differentiate you from other users.

Embed video on a asp.net-mvc website

I will be embedding a video to my asp.net mvc website.
A video on the homepage which will help people to better understand the website.
I have never done this. Can anyone tell me whats the best way of doing it.
Flash or silverlight??
I've used JW FLV Media Player. I was pretty happy with it, and it's easy to use. Flash-based.
http://www.longtailvideo.com/
My suggestion would be to go with Flash and to achieve what you're looking for, utilize swfobject. It's really quite simple to use and has a bunch of options that will be useful when you get more used to using video.
I have had pretty good success using silverlight with the Silverlight 2 Video Player as an example. However, it depends on what your requirements are.
Pros to Silverlight:
Performs Video Streaming very well
Easier to develop/customize if you are a .NET developer
Works on a variety of browser and platforms
Cons to Silverlight:
Does not support every video media type (the example above only plays .WMV files, Silverlight in general supports .WMV and .MP4)
Is not installed on as many client machines (less penetration)
Is not as well known (users may be reluctant to install it compared to Flash)
Is not as popular so there are less solutions/resources out there
Here is another discussion on the topic.
I would go with flash for only one reason: the 99% (or whatever it is today) installed base.
Then go with swfobject or JW FLV Media Player as suggested in the other answers. There is also a jQuery plugin floating around somewhere that helps deal with flash video on a site.

Resources