How can I fetch /display external media content from URL stored in json file using angular js?
JSON
"media": [
{
"title": "Example_1",
"url": "http://www.w3schools.com/html/mov_bbb.mp4"
},
…….
]
Controller
controller('Controller', ['$scope','$http', function($scope, $http) {
$http.get('myjson.json').success(function (data){
$scope.medianew = data.media;
});
HTML
<div class="panel-body" ng-repeat = "md in medianew">
<video ng-src="{{md.url}}" width="240" controls></video>
</div>
I am not able to display media from external sources. What I am doing wrong here?