Monday, 18 July 2016

WebRTC Examples

WebRTC Examples

Question: What is full form of WEBRTC?
Web Real-Time Communication


Question: What is WEBRTC?
WebRTC is an API that support browser-to-browser applications for voice calling, video calling, and P2P file sharing.


Question: Who started on WEBRTC? and when?
Google on May 2011.


Question: What are manjor components in WEBRTC?
  1. Audio Calls
  2. Video Calls
  3. Share data viz peer-to-peer
  4. Access Camera and Microphone



Question: Where will WEBRTC effect?
Real time communication such as text/audio/video between users by utilizing the browsers.


Question: What is full form of WHATWG?
Web Hypertext Application Technology Working Group.


Question: What is WHATWG?
WHATWG is a community of people interested in evolving HTML and HTML related technologies.


Question: What is WebSocket?
WebSocket is a protocol providing full-duplex communication channels over a single TCP connection.
OR
WebSocket can do communication between client to server OR server to client.



Question: Give an example of WebRTC Audio call?
https://simplewebrtc.com/demo.html?test-audio-call


Thursday, 14 July 2016

Callback, Trigger and Event handler in javaScript

what callback, trigger and event handler in javaScript
Callback is a function that is passed to another function as parameter and callback function is called inside another function.
Example:
$("#MyButton").click(function(){
    $("p#hideDiv").hide("slow", function(){
        alert("function() is callback and called.");
    });
});

Here following are callback function.
function(){
        alert("function() is callback and called.");
    }



The trigger is code that is executed automatically on some events.
Example:
<script>
$(document).ready(function(){
    $("input").select(function(){
        $("input").after(" Text marked!");
    });
    $("button").click(function(){
        $("input").trigger("select");
    });
});
</script>
<input type="text" value="Hello World" />
<button>Click on this button</button>



Handler: An event handler executes a part of a code based on certain events occurring within the application such as onClick, onBlur, onLoad etc.
Example:
$(document).ready(function(){
    $("button").click(function(){
        $("input").trigger("select");
    });
});



Following are few more event handler
Event Description
onchange An HTML element has been changed
onclick The user clicks an HTML element
onmouseover The user moves the mouse over an HTML element
onmouseout The user moves the mouse away from an HTML element
onkeydown The user pushes a keyboard key
onload The browser has finished loading the page