I have a html5-tag using the scope to set the src:
<video style="max-height:100%; max-width:100%" controls>
<source src="/files/{{item.path}}" type="video/mp4"/>
</video>
If I load this template I get this error:
GET http://localhost:8070/files/%7B%7Bitem.path%7D%7D 404 (Not Found)
Btw. this is not the correct value of item.path. If I set the path manually it works:
<source src="/files/./5315dfea66469e28166e85c6/5315dfea66469e28166e85c6_20143414248143.mp4" type="video/mp4"/>
How can I make this work?
asked Mar 31, 2014 at 13:54
marcel
3,2628 gold badges46 silver badges77 bronze badges
1 Answer 1
This is an open issue with Angular:
https://github.com/angular/angular.js/issues/1352
ng-src is appropriate here. however, it is confirmed to not work in all browsers and is suspected to be a bug in the browser rather than with Angular.
There is a possible workaround here: HTML5 video element request stay pending forever (on chrome)
answered Mar 31, 2014 at 13:56
Jake Johnson
1,8541 gold badge18 silver badges28 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
marcel
Oh, didn't found that issue by myself. I always come to a point where angularjs isn't fun anymore. Getting there now :(
default
ng-srcinstead... the problem is the video is trying to get the url before angular app is bootstrapped