iframe get if video ended

Solutions on MaxInterview for iframe get if video ended by the best coders in the world

showing results for - "iframe get if video ended"
Eduardo
29 Oct 2019
1<iframe src="https://player.vimeo.com/video/66966424" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
2
3<script src="https://player.vimeo.com/api/player.js"></script>
4<script>
5
6    var iframe = document.querySelector('iframe');
7    var player = new Vimeo.Player(iframe);
8
9    player.on('play', function() {
10        alert('You have played the video')
11    });
12        player.on('ended', function(){
13        alert('Video play completed');
14    });
15
16    player.getVideoTitle().then(function(title) {
17        console.log('title:', title);
18    });
19</script>