Ajax Video Streaming – How to Stream Video Through Ajax Calls

ajaxstream-processingvideoxmlhttprequest

These days I have seen couple of sites (including Youtube) that stream videos through Ajax calls (XHR) in few MBs or even less than MB. For an example of what I said see the highlighted lines in the image below.

enter image description here

I want to know:

  • What this technique is called in programming terminology?
  • How it works?

Best Answer

A video is a sequence of framed images that are displayed at a rate one after another. If we had all frames of a video clip in our browser, we could display them one after another at a frame rate and there we had our video playing! This sounds like a plan, let us see how we can translate this into an actual web application. From what we planned, we divide our efforts into smaller steps:

Step 1: Getting the frames, frame rate and other necessary information from a video file or a live stream

Step 2: Transport our frames over HTTP to the client’s browser.

Step 3: Animate the frames at the client, response to user interaction and request for more frames if needed.

http://www.codeproject.com/Articles/16092/Streaming-over-HTTP-with-JavaScript-AJAX-video-pla

Related Topic