Hello,

I am trying to make WebRTC enabled application. On client side, I am using 
AngularJS and on server side, I use NodeJS. I am having some trouble to 
bind video stream to video element ng-src. 

*Following is the Controller:*

.controller('WebRTCController', function($scope){

      $scope.streams = [];

       getUserMedia({video : true , audio : true}, successCallback, 
errorCallback);
       
       function successCallback(newStream){
           
        
            $scope.streams.push(URL.createObjectURL(newStream));
            
            console.log('Angular: '+ $scope.streams)
       }
       
       function errorCallback(err){
        console.log('Some Error');
       }
       
    })



*Here is the HTML page, (I use jade template)*
div(ng-controller='WebRTCController')
       | Hello {{streams}}
       br
       video(ng-src='streams', autoplay='true')

       div(ng-repeat='stream in streams')
          video(ng-src='stream', autoplay)

Kindly, let me know if this is not the correct approach. I tried first in 
ng-repeat and then also gave streams to ng-src directly. Inside  the 
controller, when I print on console, I see the mediastream (it is something 
like this : - "Angular: mediastream:4a15fb80-3aa7-4ddf-86b4-3b0cea498784") 
but I see it empty in my view.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to