AngularJS NG-SRC
HTML5的视频元素在这拨弄不起作用:的 http://jsfiddle.net/FsHah/5/
AngularJS ng-src
doesn't work with HTML5 Video element in this fiddle: http://jsfiddle.net/FsHah/5/
看视频元素,将src标签被填入正确的SRC URI,但不能播放视频。
Looking at video element, the src tag is being populated with the correct src uri, but the video doesn't play.
难道这不支持中的 AngularJS ,有什么解决方法吗?
Is this not supported in AngularJS, what is the workaround for this?
只需创建一个过滤器:
app.filter("trustUrl", ['$sce', function ($sce) {
return function (recordingUrl) {
return $sce.trustAsResourceUrl(recordingUrl);
};
}]);
在查看文件:
<audio src="{{Your_URL | trustUrl}}" audioplayer controls></audio>
上一篇:如何使用Struts2的提交标记为按钮不提交表单?表单、如何使用、标记、按钮
下一篇:在JavaScript的jQuery Mobile的不工作,除非我刷新非我、工作、JavaScript、jQuery