<span ng-repeat="x in pics.files">
<video ng-src="img/gallery_vid/{{x}}" height="200px" width="200px" class="mt-2" controls>
</video>
</span>
ng-src无法使用视频标签,如果有人可以为我提供帮助,我会很高兴。 视频没有播放,我在网上搜索了解决方法 I saw this but I didn't get it。 预先感谢
答案 0 :(得分:0)
控制器:
(function() {
'use strict';
var app = angular.module('videoExample', []);
app.controller('videoExampleController', ['$scope', videoExampleController]);
function videoExampleController($scope){
$scope.videoUrl = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4';
$scope.videoMimeType = 'video/mp4';
}
})();
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<div ng-app="videoExample" ng-controller="videoExampleController">
<span>
<video height="300px" width="300px" class="mt-2" controls autoplay>
<source src="{{videoUrl}}" type="{{videoMimeType}}"/>Your browser does not support HTML5 video
</video>
</span>
</div>