Playlist operations not recognized as functions
Hi! I'm trying to use the currentIndex() function for a playlist but it does not recognize the function. I am using it in the below way (assume playlist and playlistOptions are defined). Am I using it in the wrong way since I don't see how else we would use the currentIndex() function.
var vplayer = cloudinary.videoPlayer('doc-player', {
playlistWidget: {
direction:'horizontal',
total:2
},
showJumpControls:true,
showLogo:false,
secure:true
});
vplayer.playlist(playlist, playlistOptions).currentIndex(0);
0
-
Hello Edward,
Thank you for your question.
To be able to access currentIndex() method you need to access it on a returned object like so:
var vplayer = cloudinary.videoPlayer('doc-player', {playlistWidget: {direction:'horizontal',total:2},showJumpControls:true,showLogo:false,secure:true});vplayer.playlist(playlist, playlistOptions)
vplayer.playlist().currentIndex(0);
So in this example playlist method does not have any vars specified and then it will accept any underlying methods.
All supported methods for a playlist object can be found here.
Best regards,
Piotr.
1
Post is closed for comments.
Comments
1 comment