Player.js: Problem with cuepoints

Created on 5 Jul 2018  路  1Comment  路  Source: vimeo/player.js

Expected Behavior

It seems the new realese of today broke soemthing with cuepoints.

Actual Behavior

When I try executing on('cuepoint'):
I get this error
player.fr-FR.js:2 Uncaught TypeError: e.target.activeCues.concat is not a function at TextTrack.<anonymous> (player.fr-FR.js:2) at TextTrack.e (player.fr-FR.js:2)

Steps to Reproduce

On first play, I split the timeline in 20 parts and I save those in an array for further use.

vPlayer.on('play', function() {
    if (!playonce){
        playonce=true;
        console.log('play');
        this.getDuration().then(function(d) {
            duration = d;
            console.log('DURATION: '+d);
            cuepoints = [];
            for (i = 1; i <= 20; i++)
            {
                cuepoints.push({ val: Math.floor((d / 20)*i)-1, passed: false});
            }
            for (var i = 0, len = cuepoints.length; i < len; i++) {
                vPlayer.addCuePoint(Math.floor(cuepoints[i].val), {
                    iteration: i
                });
            }
        });
    }else{
        console.log('resume');
    }
});

When the code must execute my "cuepoint" event, it throws the error.

bug

>All comments

Sorry about that, this should be resolved in the last release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miloandco picture miloandco  路  3Comments

rassemdev picture rassemdev  路  7Comments

JohnnyWalkerDesign picture JohnnyWalkerDesign  路  4Comments

simpson77 picture simpson77  路  6Comments

jswebrjl picture jswebrjl  路  5Comments