HTML5 Video is not working with AngularJS ng-src tag

后端 未结 10 1155
北恋
北恋 2020-11-29 02:25

AngularJS ng-src doesn\'t work with HTML5 Video element in this fiddle: http://jsfiddle.net/FsHah/5/

Looking at video element, the src tag is being popu

10条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 02:28

    Just Create a Filter:

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

    In View File:

    
    

提交回复
热议问题