title: Most effective plugin to play Rtsp streams on a webpage with good browser compatibilty
body: <p>Here is a overview of my code.
  User press a record button and it hits the server to start a surveillance stream,and it returns a rtsp url which I want to play on the website.</p>
  
  <p>I have tried vlc plugin, but it seems to be unreliable the following code creates the after-mentioned problems.</p>
  
  <p>Any other ideas to implement this functionality is more than welcome.</p>
  
  <pre><code>  xmlhttp.onreadystatechange  = function()
      {
       if (xmlhttp.readyState == 4) {
         if(xmlhttp.status == 200) {
           res_array = xmlhttp.responseText.split("#");
           session_id = res_array[0];
          alert(res_array.length);
           if (res_array.length == 4)
           {
               document.getElementById("jsession").innerHTML = xmlhttp.responseText;
               rstp_url = res_array[1];
               jsession_id = res_array[2];
               var vid_tag = '&lt;OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"';
               vid_tag += ' codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"' ;
               vid_tag += ' width="320" height="240" id="vlc" events="True"&gt; &lt;param name="Src" value=" ' + rstp_url +' " /&gt; ';
               vid_tag += ' &lt;param name="ShowDisplay" value="True" /&gt; &lt;param name="AutoLoop" value="False" /&gt;&lt;param name="AutoPlay" value="True" /&gt;' ;
               vid_tag += '&lt;EMBED pluginspage="http://www.videolan.org" type="application/x-vlc-plugin" progid="VideoLAN.VLCPlugin.2" width="320" height="240"' ;
               vid_tag +=' autoplay="yes" loop="no" target="'+rstp_url+'" name="vlc"&gt; &lt;/EMBED&gt;&lt;/OBJECT&gt;';
               document.getElementById("StopRecording").disabled = false;
               document.getElementById("StartRecording").disabled = true;
               document.getElementById("StopPlayback").visible = false;
               document.getElementById("Playback").disabled = true;
               alert(vid_tag);
               document.getElementById("video_handler").innerHTML = vid_tag;
               document.getElementById("jsession").innerHTML = xmlhttp.responseText;//Update the HTML Form element
           }
           else
              {
               alert("Make sure usename,password and deviceref is correct");
              }
         }
         else {
            alert("Error during AJAX call. Please try again");
         }
       }
  };
  </code></pre>
  
  <p>These are the following problems I have.</p>
  
  <ul>
  <li>Not working in IE6.</li>
  <li>The stream playing is unreliable. It sometime plays and sometimes doesnt. The only proper way of fixing this seems to be adding a alert box just after the res_array length if check</li>
  <li>Even if try to play a audio source,a black box for playing a video appears.</li>
  </ul>
  
  <p>P.S. Would this get any easier if I try using HTML5 and I know about frameworks such as jquery, but it is not possible for me to use it in this project.</p>