Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Upgrade to videojs 5 #30

Open
doublex opened this issue Oct 3, 2015 · 11 comments
Open

Upgrade to videojs 5 #30

doublex opened this issue Oct 3, 2015 · 11 comments

Comments

@doublex
Copy link

doublex commented Oct 3, 2015

Are there any plans to upgrade this great plugin to videojs 5?

@iraniamir
Copy link

its not working on 5.4.4

@tahola
Copy link

tahola commented Dec 28, 2015

Yes, not working on 5.4.4, the seconds doenst match.

@gkatsev
Copy link
Contributor

gkatsev commented Dec 28, 2015

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.

@tahola
Copy link

tahola commented Dec 28, 2015

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.

@iraniamir
Copy link

On 5.4.5 says : Uncaught TypeError: Cannot read property 'progressControl' of undefined

progressControl = player.controlBar.progressControl;

@cryptiklemur
Copy link

Same issue that @tavousi has, here

@xbgmsharp
Copy link

@ali-idrizi
Copy link

ali-idrizi commented Jul 12, 2016

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.

@ghost
Copy link

ghost commented Mar 23, 2017

@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.

@bernardoadc
Copy link

Thanks @mrcointreau , the same worked here, using player.options.children

@trisys3
Copy link

trisys3 commented Jul 20, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants