Attaching an audio player to the jacket

What I would need to do first here is remove as much of the audio code in here as possible allowing for it to just autoplay. Then what I want to do after that is set a timer to it so it only plays for 20, 30 seconds.

Audio Javascript: CSS Removed

1.) Remove as much of the audio code as possible.

2.) Add a timer to it so the audio shuts off after a certain amount of time.

3.) When that’s all good, then attach it to the jacket.

Maybe I should add the autoplay in first, then try and start removing stuff from it so I know it’s still working.

Autoplay code:
Having trouble getting it to autoplay.
player.autoplay = true;

I’m thinking a function like this:
To set a desired time for it to stop.

function stopAudio(audio) {
    audio.currentTime = 20;

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.