视频不使用角度播放

时间:2017-08-10 05:38:58

标签: javascript angularjs

我正在使用棱角分明。

我使用API​​检索JSON数据。

这是我的代码

 $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是一个JSON数据。我安慰了$ scope.videoURL

这是安慰值$scope.videoURL http://13.56.34.247:8001/campaigns/td-YxIiHH5PDHVIFPHrps97F.mp4

我需要播放此视频。这是我的Html代码

<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>

这是我的过滤器。

 angular.module('dashyAngular').filter("trustUrl", ['$sce', function($sce) {
    return function(recordingUrl) {
        return $sce.trustAsResourceUrl(recordingUrl);
    };
}]);

但它没有Play.How我可以播放这个视频吗?

这是我的输出

enter image description here

请建议我,

感谢。

0 个答案:

没有答案