I get the following message when trying the following code.
angular.js:9419 Referenceerror: loadplayer is not defined.
Here is my code:
(function getAllAlbums(){
$http({
    method: 'GET',
    url: "api/playlist.php?type=playlist",
})
.success(function(response){
  console.log(response);
  loadPlayer(response);
})
.error(function(response){
 console.log(response);
})
})();
Down the file I have the function:
jQuery(function loadPlayer($) {
var supportsAudio = !!document.createElement('audio').canPlayType;
if (supportsAudio) {.......
Why do I get the message that loadPlayer is undefined??
 
     
    