Below Code display Video Cam feed on your page… navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; if (navigator.getUserMedia) { navigator.getUserMedia({ audio: true, video: { width: 1280, height: 720 } }, function(stream) { var video = document.querySelector(‘video’); video.srcObject = stream; video.onloadedmetadata = function(e) { video.play(); }; }, function(err) { console.log(“The following error occurred: ” + err.name); […]

Read More →

Below code can be used to determine different config value based on the environment the code is running in. “`//Environment Specifc Variable //Environment Specifc Variable Center.Config = { Local: { Api: ‘https://localhost:44300/’ }, Dev: { Api: ‘https://dev.center.com/’ }, QA: { Api: ‘https://qa.center.com/’ }, Production: { Api: ‘https://prod.center.com/’ }, getValue: function (key) { var env; switch […]

Read More →

Code to check whether given string is a Palindrom or not function palindrome(str) { // Good luck! var revers = str.split(“”).reverse().join(“”).toLowerCase().replace(/\W/g, ”).replace(“_”,””); var actualStr =str.toLowerCase().replace(/\W/g, ”).replace(“_”,””); console.log(revers +” : “+actualStr); if(revers === actualStr) {return true;} return false; }

Read More →