html - JavaScript preload Audio -


i'm new javascript, know, set , play audio file code:

player.src = "somefile.mp3"; player.play(); 

where "player" id of audio tag. question is: how can preload song? because when click on button, plays after 3s delay...

audio element has preload attribute:

<audio preload="auto|metadata|none"> // auto in case 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -