I created my first website and I'm trying to correct all my problems.I have a file javascript which can play songs automatically (audio playlist).It works on my computer and it worked when I uploaded.
Now, I securised my website and when I want to play my audio playlist, at the end of a song, it didn't go to the next song. Moreover, I'm redirected on the file (it leaves my principal page).I really don't understand this problem and I'm not enable to solve it alone.
Do you know if I can do something with my .htacess file or in my javascript file ?
var audio;var playlist;var tracks;var current;init();function init(){ current = 0; audio = $('audio'); playlist = $('#playlist'); tracks = playlist.find('li a'); len = tracks.length; audio[0].play(); playlist.find('a').click(function(e){ e.preventDefault(); link = $(this); current = link.parent().index(); run(link, audio[0]); }); audio[0].addEventListener('ended',function(e){ current++; if(current < len){ link = playlist.find('a')[current]; run($(link),audio[0]); } });}function run(link, player){ player.src = link.attr('href'); par = link.parent(); par.addClass('active').siblings().removeClass('active'); audio[0].load(); audio[0].play();}