FacebookTwitter

WebRTC or a Video Conference of Your Own

By on Jan 16, 2017 in Interesting, Intermediate, JavaScript

Vlad Dmitriev

Marketing Copywriter at Cleveroad
Vitaly Kuprenko is a Marketing Copywriter at Cleveroad Mobile and Web development company. We are focused on mobile and web development for competitive and winning software.

Latest posts by Vlad Dmitriev (see all)

Firstly, let’s cover general questions concerning WebRTC. This technology allows the building of video or audio communication through the usage of web browsers. Besides, it is an open source project and currently this technology is in use among such browsers as Opera, Google Chrome, Firefox and some more. For instance, Chrome allows you the possibility to reach the webcam and microphone of a device but only for those websites having specialized a SSL certificate. In order to connect users, they need to identify each other. It can be achieved by using WebSocket technology.   How does it work? For a better understanding, let’s consider an example of a real project in web development. As a basis for the server development, we have NodeJS supplemented by the socket.io while AndularJS has become a basis for front–end development.   Chapter 1: Where can I start? The first thing you need to do during development is to check the browser’s ability to be connected to a device’s media.   setupRTC will help you check the availability of this technology support on a separate OS or browser as well as the possibility to access the media.   startCall is intended to start checking the support of this technology. After that, the initialization will be launched on the client’s side. The socket.io helps generate the ‘callRequest’ on the server.   targetId identifies which user from the database is going to get the connection request. enableSelfVideo is responsible for everything related to the broadcast. Including...

Javascript Array Push

By on Nov 2, 2014 in Interesting, JavaScript

Enmanuel Corvo

Enmanuel Corvo

Software Engineer at LiveAnswer
Enmanuel Corvo is a Software Engineer experienced in Web Applications Development. Huge fan of Wordpress and an active plug-in author who enjoys writing code and blog posts about anything related to technology. Enmanuel also helps provide cloud solutions and software integrations to enterprise and small business.
Enmanuel Corvo

Latest posts by Enmanuel Corvo (see all)

Pushing elements into an array in Javascript Javascript Array Push push() method appends a new item to the last of an array. This is very useful, it allows you to add elements to an array fast an easy, something that you will find yourself doing a lot in javascript web programming. Javascript arrays are indexed at 0, with the last element on the array having an index one less than the length of the array. So if you had three elements on one array and wanted to access the second element you will have to reference it by its index, equal to its position minus one, [2-1]=1. ?View Code JAVASCRIPT1 2 3 4 var arr = ['item one', 'item two', 'item three']; console.log(arr[0]); // prints 'item one' console.log(arr[1]); // prints 'item two' console.log(arr[arr.length - 1]); // prints 'item three' In essence, array push() as mentioned above appends an element to the end of the array, so you can picture it like this: ?View Code JAVASCRIPT1 this[this.length] = element; Javascript Array Push VS Reference by Index However, it appears to actually be less efficient that what is represented above. According to  Javascript Style Guide, you should always use index when possible as they will outperform array push. In an experiment performed by Steven Hall, Steven proved google’s guidelines to be accurate, as his results showed that using index was after all was faster than using javascript array push method. However, this experiment was performed about 4 years ago, when browsers...

Disable Specific days jQuery UI Date Picker

By on Sep 5, 2014 in Intermediate, JavaScript, jQuery

Enmanuel Corvo

Enmanuel Corvo

Software Engineer at LiveAnswer
Enmanuel Corvo is a Software Engineer experienced in Web Applications Development. Huge fan of Wordpress and an active plug-in author who enjoys writing code and blog posts about anything related to technology. Enmanuel also helps provide cloud solutions and software integrations to enterprise and small business.
Enmanuel Corvo

Latest posts by Enmanuel Corvo (see all)

Disable Specific days jQuery UI Date Picker So I am currently working on a Calendar Plugin, and I have decided to us the very popular jQuery UI date picker for inputing anointments. jQuery UI date picker is a great tool that comes packed with tons of features. If you ever need a date picker this is definably a really good choice. The Challenge As I was working on this side project of mine, I encountered a challenge: I needed to disable specific days in jQuery UI date picker. Ideally, jQuery UI date picker will be use on my project for inputing appointments as I mentioned, and therefore it makes sense for it to only have the available days enabled. So I needed a way to disable just some specific dates in the date picker. I envisioned as passing an array with specific dates to be disabled as well as specific days (8/25/2014, 9/02/2014, etc…). This way you could disable specific dates such as national holidays and also specific days such as weekends. I was able to find some guidance on the web at StackOverflow which I used to work around this problem and create a solution. The Solution Disable Specific days jQuery UI Date Picker ?View Code JAVASCRIPT1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 /** Days to be disabled as an array */ var disabledSpecificDays = ["9-21-2014", "9-24-2014", "9-25-2014", "10-01-2014"];  ...