Home › Support Forums › Theme Support › Pinboard › Audio bar has disappeared › Reply To: Audio bar has disappeared
Hello joan w,
If it helps, I stumbled on a workaround just this morning. It’s not perfect but it will do.
Here’s what I did with my test site. In my real site, which is still being built, I copied the relevant code to my child theme and made the changes in the child theme.
In functions.php, I found the section that refers to mediaelementplayer and removed the curly brackets from the start and end of the mediaelementplayer parameter list. The code now looks like this:
$(‘.entry-attachment audio, .entry-attachment video’).mediaelementplayer(
videoWidth: ‘100%’,
videoHeight: ‘100%’,
audioWidth: ‘100%’,
alwaysShowControls: true,
features: [‘playpause’,’progress’,’tracks’,’volume’],
videoVolume: ‘horizontal’
);
That got an audio control appearing in the grid.
However, there were still two audio controls showing when I went into the post. To fix that, I edited single.php and removed the call to pinboard_post_audio(). That left only one audio control.
The gotcha now is that the audio control on the grid looks different to the one that appears in the post. It must have something to do with the browser’s default audio player but I can’t figure out how to change it. If anyone knows, I’d love to hear from you! π
It also means that for every audio post, you have to embed the audio and make sure it’s attached to the post.
This seems to work for me. Hope it helps you, too. You can see the result of the changes in my test site http://www.greyfb.com/testwp411/blog/.
Cheers!
- This reply was modified 9 years, 9 months ago by GreenZebra.