Open doublex opened 8 years ago
its not working on 5.4.4
Yes, not working on 5.4.4, the seconds doenst match.
Yeah, this needs to get updated to videojs. Anyone want to take a crack at it? See https://github.com/videojs/video.js/wiki/5.0-Change-Details for the changes.
For anyonye interested, changing this line
mouseTime = Math.floor((left - progressControl.el().offsetLeft) / progressControl.width() * duration);
by
mouseTime = Math.floor(event.offsetX / progressControl.width() * duration);
worked for me.
On 5.4.5 says : Uncaught TypeError: Cannot read property 'progressControl' of undefined
progressControl = player.controlBar.progressControl;
Same issue that @Tavousi has, here
For Video.js 5, in videojs.thumbnails.js
I replaced this line:
mouseTime = Math.floor((left - progressControl.el().offsetLeft) / progressControl.width() * duration);
with this
var mouseTimeHMS = $(".vjs-mouse-display").attr("data-current-time").split(":");
var mouseTime = 0;
for(var i = mouseTimeHMS.length - 1; i >= 0; i--)
mouseTime += parseInt((i == mouseTimeHMS.length-1) ? (mouseTimeHMS[i]) : ((i == mouseTimeHMS.length-2) ? (mouseTimeHMS[i] * 60) : ((i == mouseTimeHMS.length-3) ? (mouseTimeHMS[i] * 60 * 60) : (0))));
And it is working perfectly in any way now.
@iraniamir about the
Uncaught TypeError: Cannot read property 'progressControl' of undefined
in my case me the error triggers if I init the player and add the plugin within the same statement
var player = videojs("video", {
plugins: {
thumbnails: {
// plugin settings here
}
});
but doesn't if I separate the player initialization from the plugin's one
player = videojs("myVideojsId");
player.thumbnails({
// plugin settings
});
I'm using videojs 5.13.2 minified version.
Thanks @mrcointreau , the same worked here, using player.options.children
By now, you would need to be compatible with VideoJS 6-7, as well. To be clear, I'm not sure if adding compatibility with 5 won't automatically add compatibility with 6-7, just putting it out there.
Are there any plans to upgrade this great plugin to videojs 5?