jQuery(document).ready(function($) {
$('#videolayer').mediaelementplayer({ defaultVideoWidth: 890, defaultVideoHeight: 400, enableAutosize: true, success: function(media) {
media.addEventListener('play', function(media) {
jQuery.post("http://localhost/meshchemia/wp-content/themes/meshchemia/session.php", { "session":"lastcheck" });
}, true) };
});
});
I’m trying to make an ajax call when the user plays the video, what’s wrong with my code?
Try this:
If nothing is happening, use Firebug to work out whereabouts in your code errors are occurring.