Previous answer is now obsolete since Vimeo launching the new Video Player API.
Important: Be sure to remove the ?api=1
from the URL in your iframe. This was previously required when using the Froogaloop library and is no longer needed. If you leave it in, the 'ended', 'seeked' and other events will never fire.
Include the new script:
<script src="https://player.vimeo.com/api/player.js"></script>
And then use the following example:
$(document).ready(function(){
var iframe = $('#container iframe');
var player = new Vimeo.Player(iframe);
player.on('ended', function() {
console.log('Finished.');
});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…