Video not playing in angularjs -


i have url of video. video not playing properly. tried $sce don't know problem. new in angularjs.

  $scope.videoapi = function(id) {           $http({       method: "post",       url: "http://192.168.1.16:8070/courseapi/getpdf",       data: {         'id_course': id       }     }).then(function mysucces(response) {       alert("listapi" + json.stringify(response.data));       var videourl = response.data;        $scope.trustedurl = $sce.trustasresourceurl(videourl);          }, function myerror(response) {           $scope.message = response.statustext;           console.log(response.statustext);           alert("courseenrolled");         });   } 

the view code

  <video width="320" height="240" controls>     <source ng-src="{{trustedurl}}" type="video/mp4">     <source ng-src="{{trustedurl}}" type="video/ogg">    </video>  


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -