<div id="vfi09" data-vimeo-id="538315797" data-vimeo-width="640"></div>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
    var handstickPlayer = new Vimeo.Player('vfi09');
    handstickPlayer.on('play', function() {
        console.log('played the handstick video!');
        jQuery.ajax({
           type: "POST",
           url: "/wp-admin/admin-ajax.php",
           data: {
               action: 'reproduce_video',
               video: 'fi09'
           },
 error: function(response){
               console.log(response);
           },
           success: function (output) {
             console.log(output);
           }
        });
    });

</script>
PHP Code Snippets Powered By : XYZScripts.com