I am using angular.
I retrieve a JSON data using API.
Here is my code
$scope.camres = response;
if($scope.camres.campaigns.video)
{
var v=$scope.camres.campaigns.video;
console.log("V",v)
if(v != undefined)
{
$scope.videoUrl =$scope.rurl + $scope.camres.campaigns.video;
}
}
console.log("$scope.videoURL",$scope.videoUrl);
$scope.cameras
is a JSON data.I consoled the $scope.videoURL
Here is consoled value $scope.videoURL http://13.56.34.247:8001/campaigns/td-YxIiHH5PDHVIFPHrps97F.mp4
I need to play this video.Here is my Html code
<tr *ng-if="videoUrl != undefined">
<td><b>Campaign Video</b></td>
<td>
<video width="400" controls>
<source ng-src="{{videoUrl | trustUrl}}" type="video/mp4">
</video>
</td>
</tr>
Here is my filter.
angular.module('dashyAngular').filter("trustUrl", ['$sce', function($sce) {
return function(recordingUrl) {
return $sce.trustAsResourceUrl(recordingUrl);
};
}]);
But it does not Play.How can I play this video?
Here is my output
Kindly advice me,
Thanks.