Answers for "stream videos using angularjs"

0

stream videos using angularjs

https://github.com/2fdevs/videogular
OR
creating your own custom directive can does the job for you (Preferred and reusable),

The simplest way is using angular.element and selecting the required video element from the DOM using its functionalities.

 <video autoplay="autoplay" preload="auto" ng-click="pauseOrPlay()">
 <source src="{{url }}" type="video/mp4" />
 </video>
//controller

function myCtrl($scope) {
   $scope.url = "url of video or audio"
   $scope.pauseOrPlay = function(ele){
     var video = angular.element(ele.srcElement);
     video[0].pause(); // video.play()
   }
}
Posted by: Guest on December-07-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language