WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Audio glitch on iOS (9 posts)

  1. Quest The Wordsmith
    Member
    Posted 10 months ago #

    Here's my site page: http://thetracksmiths.com/beats/bap-adapt/

    Problem: WP 3.6 audio players inside the table (when datatables is enabled) do not play on iOS (iPad / iPhone).

    Scenario: I'm using a free WP plugin called TablePress. This plugin creates html tables as you'll see on my site above. It also uses (optionally) a javascript library called Datatables to enhance the html table with column sorting, pagination, search, etc. When I disable the datatables functionality, i.e. just a plain html table, the players play across all browsers and platforms. When I enable it, only iOS won't play the players.

    Naturally, I concluded the issue is somewhere in the datatables functionality. After much back & forth on datatables' forums, here's what the author had to say:

    So I've just had a bit more of a look into this, and I can fairly easily replicate the issue without DataTables. All that needs to be done is to remove the element from the document and then add it back in again. The media player simply fails to play after that on iOS (and this removal and addition is fundamental to how DataTables works).

    For example, if you disable DataTables on your page and add this code:

    jQuery(document).ready( function ($) {
        var a = $('#tablepress-2 tbody tr:eq(2)')[0];
        a.parentNode.removeChild( a );
    
        $('#tablepress-2 tbody').append( a );
    } );

    All of the players in the table will work, expect the very last row (the one that has been removed and re-added).

    So its not something that DataTables is doing wrong, but it is a problem in the media player that is triggered by the actions DataTables take. As I say, this is fundamental to DataTables and isn't likely to change, so we need to know either if the author of the media player library can fix it for when items are removed and then added back into the DOM. Or if there is some sort of re-initialisation that can be called when the element is added back into the DOM.

    If I'm understanding correctly (I'm no coder!), what the author is saying is that something in the audio code is playing nasty with iOS when it's taken off the page and then re-added. Since the audio functionality is part of the WP core now, here I am! I'm hoping the good people of the WP forum will be able to solve this mystery!

  2. What version of WP 3.6 are you on?

  3. Quest The Wordsmith
    Member
    Posted 10 months ago #

    I'm using WP3.6 beta 4. I've constantly been upgrading to the latest version as they come out in hopes there will be a fix to this.

    UPDATE
    Here is the new link to view my problem: http://thetracksmiths.com/beats/fight-club/

  4. Beta ... 4. There is no Beta 4. The last one that came out was Beta 3.

    You MAY want to try using the Nightly release instead in your case.

  5. Sergey Biryukov
    Trac Moderator
    Posted 9 months ago #

    Beta ... 4. There is no Beta 4. The last one that came out was Beta 3.

    3.6 Beta 4 came out with 3.5.2: http://wordpress.org/news/2013/06/wordpress-3-5-2/.

    we need to know either if the author of the media player library can fix it for when items are removed and then added back into the DOM. Or if there is some sort of re-initialisation that can be called when the element is added back into the DOM.

    WordPress 3.6 uses MediaElement.js library for audio and video players. This should probably be reported upstream: http://mediaelementjs.com/support/.

  6. Quest The Wordsmith
    Member
    Posted 9 months ago #

    You MAY want to try using the Nightly release instead in your case.

    ^^^ I am using the nightly release. That's how I have Beta 4.
    Here's my screenshot: http://stash.reaper.fm/16958/wpbeta4.gif

    WordPress 3.6 uses MediaElement.js library for audio and video players. This should probably be reported upstream: http://mediaelementjs.com/support/.

    ^^^ I was under the impression that WP 3.6 used this plugin as a base for it's built in audio, but it's not an exact copy. Plus, the support on that plugin is scarce. I'll try, though.

    Anybody have any other ideas?

  7. Ohh I missed Beta 4!

    Quest: Beta 4 != Nightly

    http://wordpress.org/download/nightly/

  8. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    I got beta 4 when I updated from the nightlies an hour or so ago.,

  9. TobiasBg
    Member
    Posted 9 months ago #

    Hi Quest,

    great to hear that you got more input on this from the DataTables developer! :-) Looks like we are making baby steps in fixing this :-)

    Best wishes,
    Tobias

Reply

You must log in to post.

About this Topic