WordPress.org

Support

Support » How-To and Troubleshooting » Core Media Player – Stop Space Bar From Stopping And Starting Audio?

Core Media Player – Stop Space Bar From Stopping And Starting Audio?

  • joshuacls
    Member

    @joshuacls

    Hi. I just upgraded to wordpress 3.8.1 from a much older version, and had to change my audio player, from a plugin I was happy with, but is no longer supported. The best solution I have found was the built in core media player (3.6?) — as far as looks, and function.

    Unfortunately, there’s a problem with it. Space bar starts and stops the Audio, and you can not turn this feature off!

    I’ve searched high and low, and cannot seem to find a solution to this.

    I’m in the audio production business, and have an OLARK chat box on my site, that customers routinely go through audio samples, and chat with me about them through.

    The problem is — if they try to type in the box, while listening to the samples, the space bar toggles the media player on and off — and they can’t type a space! This is very annoying, and I have not been able to find a work around.

    The only instance where customers need to type is this chat box, so if there’s a known individual work around for that I’m open to it.

    Here’s my site: http://www.ursamajorsound.com

    Thanks in advance for your help!

Viewing 15 replies - 16 through 30 (of 31 total)
  • joshuacls
    Member

    @joshuacls

    Man. Still no dice. Haha.

    Evan Herman
    Participant

    @eherman24

    Yea I do see the function in there. It just doesn’t look like its firing.

    Let me try setting it up on localhost and embedding a song, and see if i can replicate it. Give me a few mins. Ill report back here.

    joshuacls
    Member

    @joshuacls

    It is updated to the newest code you just sent over

    Evan Herman
    Participant

    @eherman24

    Ok, I’ve got the audio embedded. Let me do some testing.

    Evan Herman
    Participant

    @eherman24

    well this is turning out to be a little more challenging than anticipated.

    joshuacls
    Member

    @joshuacls

    It seems like it should be so easy…
    Shocking that no one else has had this problem!
    (at least that I can see)

    Evan Herman
    Participant

    @eherman24

    Quite interesting that this function:

    function remove_playbutton_focus() {
    ?>
    <script>
    jQuery(document).ready(function() {
    		setTimeout(function() {
    			jQuery('.mejs-play > button').click(function() {
    				jQuery(this).blur();
    				jQuery('.mejs-play').blur();
    			});
    		}, 1500);
    });
    </script>
    <?php
    }
    add_action('wp_head','remove_playbutton_focus');

    removes the action when clicking enter, but not spacebar. check it out.

    joshuacls
    Member

    @joshuacls

    Interesting… Enter doesn’t actually seem to be an issue in Safari, at least.

    Evan Herman
    Participant

    @eherman24

    Yea, I figured.

    I’m still working, well figure it out.

    joshuacls
    Member

    @joshuacls

    You’re the man, brother!

    Evan Herman
    Participant

    @eherman24

    Ok, well I’ve figured it out in the way that were NOT supposed to be doing it.

    I had to go in and edit a core WordPress file, which means the next time WordPress gets updated the changes are going to be thrown out.

    I’m trying to find the correct filter to use to change up the settings before the audio player is initialized.

    If I can’t figure it out I’ll at least get you the one that works.

    Evan Herman
    Participant

    @eherman24

    Ok, so I’ve deregistered the default script, and re-registered a new script. One issue tho is the player skin does not look the same. The controls work as you need, but the skin is a bit different.

    joshuacls
    Member

    @joshuacls

    How different? Can you show me?
    Also, If you ever need audio post production work done, hit me up — I’ll hook you up!

    Evan Herman
    Participant

    @eherman24

    This is what it looks like: here . I’m working on getting the styles the same as they were.

    And thanks dude I really appreciate that.

    Evan Herman
    Participant

    @eherman24

    I can’t seem to find another way of achieving this. There doesn’t seem to be a filter to pass in custom settings.

    Very odd indeed….

    Does the style of the player above not work for you?

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Core Media Player – Stop Space Bar From Stopping And Starting Audio?’ is closed to new replies.