Need: I want to get the onComplete event (like the answer here: How to detect the end of a BrightCove Video?) but not able to hook it up to the react version - the documentation link in the answer also returns a 404
MVCE:
onComplete
to fire, like success case is firing ( onSuccess: function(success)
)Here is how I got this working;
onComplete
(or even onEnded
or onFinsihed
) event anymore like this answer on stackoverflow suggestedonSuccess
function- https://player.support.brightcove.com/publish/brightcove-player-loader.html#Available_parameters
- complete list of events: https://docs.brightcove.com/brightcove-player/1.x/Player.html
relevant JS:
onSuccess: function(success) {
var myPlayer = success.ref;
myPlayer.on('ended',function(){
console.log('video ended...');
});
},
complete working codepen here