player.js
player.js copied to clipboard
[Feature request] override caption styles (font, size, color, position)
Hi there,
It would be great if there were additional options that allowed for:
- Updating the font and font-size.
- Example use case: adding a custom control to adjust the text size of the captions.
- Changing the color of the text and background.
- Example use case: help support high contrast mode for accessibility, set colors to improve contrast based on video content.
- Some limited options for positioning.
- Example use case: setting a max-width for captions on a cropped video, reposition captions in videos that include text.
Related issues
#267 #616
Completely agree! Vimeo has this strange behavior with subtitles on Plyr's player. Something should be done from Vimeo's side.
Vimeo would also do us all a big service to implement the possibility to convert plain .srt subtitles to WebVTT subtitles which could then be edited / stylized directly into Vimeo.
Thanks a ton for your feedback! We will keep this ticket open and provide more updates when they become available.
Seems that subtitle customization has been implemented on Vimeo recently. Sadly, color tags in SRT or VTT files are now ignored...
Merci beaucoup pour l'info!
Hi, @Philippe-MTL ! Vimeo dev here. I wasn’t aware of any color tags working previously in the vimeo player. Can you give an example of what sort of tags you were able to include previously that changed the color of captions?
Hi Steve,
I used to give the song title in blue, to differentiate it from the text of the song, as in :
WEBVTT
00:00:00.030 --> 00:00:03.062 *<c.cyan>*Erik Satie - Ludions (Léon-Paul Fargue)
- Air du rat - The Rat's Air** Abi Abirounère
00:00:03.617 --> 00:00:05.937 Qui que tu n'étais don? who then that you were not?
this doesn't work anymore as Vimeo's subtitle customization is applied to the whole file...
Thanks for looking,
- Philippe
On Wed, May 18, 2022 at 2:54 PM Steve Giordano @.***> wrote:
Hi, @Philippe-MTL https://github.com/Philippe-MTL ! Vimeo dev here. I wasn’t aware of any color tags working previously in the vimeo player. Can you give an example of what sort of tags you were able to include previously that changed the color of captions?
— Reply to this email directly, view it on GitHub https://github.com/vimeo/player.js/issues/747#issuecomment-1130390309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMFPLBR4QZ7FHYPKRTLZ73VKU4HDANCNFSM5B444B4A . You are receiving this because you were mentioned.Message ID: @.***>
So that should be adding a class of "cyan" to that block of text, but we were never actually styling it in the player. Maybe the site which the video is on was in some way and now the new styles are overriding it. Do you have a link to the site that this video is on? I'd be curious to see.
Here we go :
https://vimeo.com/manage/videos/684278688/3e7a52bd5e
Unfortunately I could not find any screenshot to document it...
- Philippe
On Wed, May 18, 2022 at 3:19 PM Steve Giordano @.***> wrote:
So that should be adding a class of "cyan" to that block of text, but we were never actually styling it in the player. Maybe the site which the video is on was in some way and now the new styles are overriding it. Do you have a link to the site that this video is on? I'd be curious to see.
— Reply to this email directly, view it on GitHub https://github.com/vimeo/player.js/issues/747#issuecomment-1130413364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMFPLGT34ASU2JFWQFN7R3VKU7FZANCNFSM5B444B4A . You are receiving this because you were mentioned.Message ID: @.***>
POSITIONING via an uploaded WebVTT file does not work either. This will be a big problem for me, as I often have to reposition specific captions so they don't overlay onto existing lower thirds. Has anyone figured out a hack to override Vimeo's fixed caption positioning?
Any news about positioning via an uploaded WebVTT file? Is there another way to modify the position of the caption?
Thanks