Oh, I didn’t notice that the scripts are also called on site #1, because the basic audio tags are not being replaced by all the mejs… stuff. (I was only looking at the resulting DOM until I felt the need to check the source of site #2 because that was the one doing things I didn’t expect.)
Site one is running on WP 4.4.4 – site 2 is using 4.5.3.
Yeah, I know. Someone else is supposed to be doing that kind of maintenance on site #1 these days, but I should give that person a reminder.
The media players are being displayed in different configurations. Site one displays full controls, site 2 just a play button and time.
The themes are different, the approach to layout is also different.
It doesn’t seem to matter what theme I use, and the reason the player on site #2 only showed a few of the controls is that my CSS “.message-list .message-files audio { width:200px; }” (which is in my plugin code, not the theme) didn’t apply after the JS replaced the player. The controls were still there, just buried in the small default size. I have now applied the 200px width to .mejs-audio too, but I still don’t like the appearance of that player. Should I just get over it?
The scripts are part of the WordPress media player.
Okay, in light of that fact, can someone answer any/all of the following questions:
- Why does WP replace the shortcode with a simple <audio> tag that works fine, and then runs JS to replace that with something far more complex?
- Is there a setting somewhere to disable that “feature”? Or would that it be a bad idea for some reason?
- Why does site #1 have those scripts but is not affected by them? If it were merely the WP version difference, I wouldn’t expect the scripts to be there at all on the older one. Could it have something to do with the version of PHP? The two sites are on different hosters with very different PHP versions: site #1 is on 5.2.9 and site #2 on 5.4.45. But that doesn’t make sense – the difference is happening in the browser, not the server…
I would try to answer these questions for myself, but I haven’t found much information about mejs and why/when it does what it does.