This is a simple cue point trigger.
When the video's current time reaches a cue point it does something, on the example code below we will just output something using alert.
Cue point trigger is still working for the past few days, I just noticed today that it's not working anymore and generates an error.
Using firebug on google chrome Console, it says that cuePoint was successfully added, but when video reaches the cue point, it throws an error.

URL: http://rjlwebph.com/vimeo-cuepoint/test.html
Here is my code:
<script>
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
var cueTime = '60';
player.addCuePoint(cueTime, {
customKey: 'customkey'
}).then(function(id) {
console.log('cue point added successfully, id: '+id);
}).catch(function(error) {
switch (error.name) {
case 'UnsupportedError':
console.log('cue points are not supported with the current player or browser: '+cueTime);
// cue points are not supported with the current player or browser
break;
case 'RangeError':
console.log('the time was less than 0 or greater than the video鈥檚 duration: '+cueTime);
// the time was less than 0 or greater than the video鈥檚 duration
break;
default:
console.log('some other error occurred: '+cueTime);
// some other error occurred
break;
}
});
player.on('cuepoint', function() {
alert('cuePoint reached... '+cueTime);
});
</script>
Able to reproduce on Chrome 68 & Firefox 62.
The error also appeared with the code presented in the official docs, so it doesn't appear to be an user error.
<html>
<head>
</head>
<body>
<iframe src="https://player.vimeo.com/video/76979871" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen allow="autoplay; encrypted-media"></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
console.log('played the video!');
});
player.getVideoTitle().then(function(title) {
console.log('title:', title);
});
</script>
</body>
</html>
I'm seeing the same error.
"@vimeo/player": "2.6.3"
Chrome Version 69.0.3497.100 (Official Build) (64-bit)
Update, I tested it today and it's now working, no more funky error thrown. Thank you.
Sorry about this and thanks for reporting. This issue was fixed.
Thank you!
It's working for me as well.
Most helpful comment
Sorry about this and thanks for reporting. This issue was fixed.