TablePress & DataTables - works on everything but iDevices
TablePress & DataTables - works on everything but iDevices
Wordsmith
Posts: 22Questions: 0Answers: 0
I'm using the plugin TablePress on my website. I have a table populated with music players and other info which can be seen here: http://thetracksmiths.com/beats/bap-adapt/. For whatever reasons, the music player does not work on iPhones or iPads. It IS working on android devices.
When I tell TablePress not to use DataTable's functionality (in my case, pagination, sorting, and search), the players work fine on the iDevices. What could possibly cause this? I appreciate any insight. Thanks.
When I tell TablePress not to use DataTable's functionality (in my case, pagination, sorting, and search), the players work fine on the iDevices. What could possibly cause this? I appreciate any insight. Thanks.
This discussion has been closed.
Replies
I'm wondering if the music player is trying to initialise while the nodes are not on the page.
Allan
Also, when I try in Safari or Chrome (haven't trying any other browsers) the player doesn't appear to do anything?
Allan
The plugin isn't in the WordPress repository, it's a premium plug from CodeCanyon. I can link you to any of the files it contains on my server if that helps. Here's the link to the plugin on CodeCanyon: http://codecanyon.net/item/html5-music-player-with-3-css3-skins/1275465
I've just tried your site on an iPad and it mostly appears to work - the music player does everything but actually play music (scrolling, play / pause interaction).
I don't understand what would cause that without some deep debugging I'm afraid. Have you asked the author of the player library if they've seen this kind of thing before?
Allan
Thought maybe this would offer up some insight. All I looked for in the source code was *.js and found datatables in there. I wouldn't know what else to look for for any other insight.
For example, if you disable DataTables on your page and add this code:
[code]
jQuery(document).ready( function ($) {
var a = $('#tablepress-2 tbody tr:eq(2)')[0];
a.parentNode.removeChild( a );
$('#tablepress-2 tbody').append( a );
} );
[/code]
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.
Allan
Allan
Allan