I have the following code in my html Body section for a one page site: <audio autoplay="autoplay"> <source src="resources/click.mp3">
and this worked fine (just a little soft short sound on load!
But then I purchased Joe Workman’s HTML5 Audio because I needed some normal audio players in the page.
The problem now is the autoplay audio has manifested its own player visible at the bottom of the page and for the life of me I’ve tried every version of hidden =“hidden” or controls= “” or none or etc and cannot get the player to be invisible for the autoplay sound.
So won’t that make all the players disappear? In which case my in page audio players will disappear?
…Actually I just tried it and that didn’t make any of the players disappear!
Thanks
You did not answer the question. If it’s the stack of audioplayers which are appearing at the bottom of the page then using Chrome inspector they can be hidden with the CSS I provided.
The JW html5 audio stacks appear to have a different class name so I would not expect them to be impacted by the CSS. In Chrome inspector they are still visible after the CSS I provided has been activated.
Try adding !important to the CSS like this:
.audioplayer {
display: none !important;
}
If that fails a screenshot of where you are putting that CSS snippet might be useful.
Thanks again klaatu.
To answer the question: yes it is the rows of audio players at the bottom of the page. These are the autoplay sounds that should be hidden and have been implemented with the code I quoted at the top placed in the Body of the page.
I have not looked at your CSS code with Chrome, will do so now…and I’ll add !important.
I am adding the CSS in RW7’s CSS inspector but I am checking it by looking at the actual page’s html.
If I remove this to leave just your code, the autoplay audio player disappears but the normal JW players stay visible.
Then I tried putting your code before the above code and it still all works fine…so it was a matter of the order?
Look at that last block for h1,h2,h3,h4,h5,h6 - thats proper messed up isn’t it? The class selector for audioplayer ( .audioplayer) is jacked into the styling directive block for the h(x) selectors and thats not going to come out well.
Ah you are correct…it wasn’t the order of the CSS it was my typing.
TBH I’m not really capable of writing code because my head melts…as you can see it’s not what I do for a living, but I want to make my own website and constructing one is a bit like composition and I enjoy it a lot.