-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with chapters #3447
Comments
Thanks for the issue. We'll get around to it when we case. A PR is always greatly appreciated.
It probably makes sense to always listen to
Not sure that making the ChaptersMenuItem
That makes sense as an enhancement.
Yup,
The font-family was recently updated.
Not sure what these means.
It looks aligned to me, but very possible it isn't perfect. Vertical alignment is hard in CSS. |
@gkatsev I'll be able to work on it in the next weeks sometime, but as I've never contributed here yet, it will take time to learn your workflow, testing strategy, etc. That's why I suggested that someone should make this relatively small changes instead of me. About |
@cervengoc I chose to go with Looks like the outstanding PR also includes https://github.com/videojs/video.js/pull/3472/files#diff-9a53c3d0b5b8d51011b2ba56e434ea2cR24. Have you ran into the issue with https://github.com/videojs/video.js/blob/master/src/js/menu/menu-item.js#L72?
@gkatsev Maybe we should handle? or create another ticket for this? If |
…3472) * Refactored ChaptersButton, broke logic into several methods. * Fixed the issues in #3447 about in some browsers tracks have an empty cues array instead of null. * Now we always subscribe to load event, and force an update. Also, track changes are handled, so chapters track can now be changed at runtime. * Fixed the issue in #3447 about chapters menu items are not selectable. Now automatic update of the selected item based on player time works fine. * Implemented the usage of the chapters track's label attribute as menu title, if it's present. If not, we fall back to the localized "Chapters" title. * Refined the menu styling, so that vjs-menu-title telement won't get the hover effect, It would confuse users, because they might believe that the title item is a clickable item too.
The PR has finally been merged. |
Hello guys, I had problems with chapters. I don't have time for the PR, but here are a list of issues which I've found and fixed locally.
load
event only whencues == null
. In latest Chrome I have an emptycues
property, so it seems like several browsers handle it differently. IMO the best would be to always subscribe to theload
event and issue anupdate
. Also, it would be needed to unsubscribe from it when player is disposed; when track is removed; etc. As a quick fix I refined the relatedif
condition to!chaptersTrack.cues || !chaptersTrack.cues.length
.selectable
, otherwise it won't update it's selected style oncuechange
.track
'slabel
as menu title and fall back to "Chapters" if not provided.createItems
is incorretct, and not even called (createMenu
is used instead), so it should be removed.Arial
because it inheritsVideoJS
font, so menu items and title look ugly; menu items have strange padding, the text is not aligned to the middle vertically.Please someone handle these in the next release.
The text was updated successfully, but these errors were encountered: