title: How to access video streaming objects via angularjs approach?
body: <p>During HTML5 implementation regarding media capabilities
  by referring to <a href="https://davidwalsh.name/demo/camera.php" rel="nofollow noreferrer">https://davidwalsh.name/demo/camera.php</a>,
  it points to  </p>
  
  <pre><code>var video = document.getElementById('video');
  if(navigator.mediaDevices &amp;&amp; navigator.mediaDevices.getUserMedia) {
     // Not adding `{ audio: true }` since we only want video now
     navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) {
         video.src = window.URL.createObjectURL(stream);
         video.play();
      });
  }
  </code></pre>
  
  <p>for video streaming the object.  </p>
  
  <p>Instead of that i want to use angular way to achieve this, so i applied these changes : </p>
  
  <pre><code>var video = angular.element($("video"));
  if(navigator.mediaDevices &amp;&amp; navigator.mediaDevices.getUserMedia) {
    // Not adding `{ audio: true }` since we only want video now
    navigator.mediaDevices.getUserMedia({ video: true }).then(function(stream) {
        video.src = window.URL.createObjectURL(stream);
        video.play();
     });
  }
  </code></pre>
  
  <p>But from angularjs approach, I am unable to stream the video object,
  any suggestions on this or any alternative approach?</p>