-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Video Block: Subtitles #7673
Comments
Can I ask how you get to this from the existing editor without a plugin? It would be great for steps so people can replicate and explore. |
Here you can download example .mp4 and .srt files: https://github.com/mediaelement/mediaelement-files |
Hey @melchoyce
|
Is there any movement on this at all? As it stands I cannot add subtitles at all, let alone per language, to videos, which is not a good experience for my users :( |
As commented on a similar issue, not sure the sidebar is the best place for tracks. Anything content related should be within the block. And yes, flags are not languages 🙂Also, prefer plain text when possible instead of icons. |
@afercia In the most ideal scenario, where would you expect the tracks to appear? I think that's a really tough question to answer but should help drive this ticket forward |
@anevins12 tough question. I don't even understand why clicking the "Edit" button (the pencil) switches back the editor to the "placeholder". Instead, in the Classic Editor it opens the details modal, where there's plenty of space for all the settings: In Gutenberg the available space is way more limited. The sidebar is only 300 pixels wide. Also, we know it's very hard to use for persons with accessibility needs. I'd like to see more settings in the "placeholder": According to the Gutenberg design principles, the primary actions / settings should be in the block UI. I'd say alternate sources and tracks are directly related to content and as such are "primary". |
It would be great to be able to upload and assign subtitle/caption tracks directly in the placeholder. In addition to making an easier interface, it would also greatly increase people's awareness of the feature and improve the likelihood it gets used. |
I'll try an updated version with the fields in the placeholder! Any thoughts on whether the sidebar would feel like an appropriate place for changing or updating subtitles after the fact? My inclination still leans towards the sidebar as a good place to house subtitles, but I want to get y'alls a11y opinions first. |
You mean fields for switching out already-added subtitles for a different set of subtitles? Sidebar might be OK as a place to change subtitles - while I think adding subtitles in the first place is a first-tier activity, I can see changing them as a secondary activity. It should be a considerably less frequent task. That said, I do agree with @afercia that content changes should generally take place within the block itself - and captions & subtitles are definitely content. It seems like there should be ample space in the placeholder container or some other in-block interface to manage these. |
I've created a first pass at a proposal and prototype. I've considered the following as requirements to meet:
The following prototype covers the case of adding multiple tracks. Each track has the option to be edited or deleted. The flow shown above would bring us to parity with what's currently available in the classic editor. In order to make the editing of the track's attributes friendlier, we'd need to hide the track's markup and instead expose each attribute as a separate input field, as suggested above. I'll continue exploring ideas around this. For now, I'd appreciate feedback on the prototype I shared:
|
Hey Enrique!
An overview of todays method:
Based on the above Classic Editor. Now transferred to Gutenberg. After having added a video one then might want to add a subtitle. It is really helpful to have a subtitle icon in the toolbar. Making it easy to upload/media library and edit inline the existing subtitle(s). Inline editing keeps it directly in place without having to go to another screen to edit the subtitle. I did not see anything missing in relation to subtitles from your prototype.
I am not sure what you mean with this (just send me a message and I can rephrase/edit this comment), but the way you have set it up with the subtitles icon with upload/media library works well for one or multiple tracks/subtitles.
As I experience it tracks in relation to video can be confusing while subtitles is a common term. But as I read your comment again. It seems that video track is something above in the hierarchy of video subtitles. Tracks is used inside the inline editing of a subtitle and also used above the edit area. Having the word tracks so prominent just above the subtitles to me seems like a mistake. Instead of the word TRACKS it should say Subtitles, as right below the subtitles are linked. Inside the subtitle edit area it could for instance say attribute instead of tracks. |
"Tracks" is the most correct option here. The track element in HTML5 is used for subtitles and captions, but is also the element that provides support for chapters and other metadata. If this only said 'subtitles', it would strongly imply that it only supported that kind of track. From a terminology standpoint, "tracks" should be considered more similar to tracks in audio mixing (e.g., parallel simultaneous tracks), rather than tracks on a CD (discrete sequential tracks.) However, the UI certainly has room for improvement; it might be better to expose each type of track as an independent upload option matching the type of data. E.g., 'Subtitles', 'Captions', 'Chapters', etc. However, that's not really necessary to reaching parity, and might be better as a later interface improvement. |
Thanks for the feedback @paaljoachim, @joedolson and @pablohoneyhoney! 🙏 I spent a little more time working on the UI and looking at ways to make the editing of track attributes a little friendlier. Here's a new prototype: There's a new step after uploading a track file that lets the user modify the This new UI also appears when the user chooses to 'Edit' a track. There's a "(?)" in the "Source language" field label that I'm thinking can link to the W3C reference on language tags and how to use them. The 'Kind' dropdown should let the user pick between
|
Hi All, thank you for your assistance! |
Aside: Unsubscribing from this issue as, for what concerns accessibility, it's already in the good hands of @joedolson and @enriquesanchez. |
@enriquesanchez I really like the additional editing screen you made. Which makes it a lot easier to edit a track. |
This is a good starting point, and is an improvement on the equivalent process in the classic editor. I'd like the 'Edit' button to look more button like, but that's just design, and shouldn't stop this from moving forward. |
Are "tracks" a clear enough term for users to use as the entry point? (Tooltip and heading within the dropdown menu.) I like the explanatory text, I think we should be using more of these contextually. |
@mtias I'm not sure, as others mentioned above, while technically accurate the term feels more audio-related to me. On the other hand, "subtitles" does not fully represent all the different types of tracks you can upload (captions, description, chapters, etc.). We could call it "Captions & subtitles"? I've seen these two as the most common terms used for these text alternatives. |
Looking at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track, maybe "Text tracks" is a better umbrella term for all of these types? |
@Soean The design feels like in a good shape to start working on a PR. Would you have availability to work on this? |
I think that 'Text Tracks' seems like a good choice. It conveys more clearly the type of content that's in common to all of the supported fields without implying that it only supports a subset of those choices. If it's called "Captions & subtitles", that would suggest that it doesn't support chapters or descriptions. As far as I know, the player does not currently support descriptions, however. |
Would love to have a status update on this; this is a major accessibility gap in the feature set of Gutenberg, and if there's any chance it can get into a near-future release, I'd like to know that! |
If no one is already working on an implementation of this feature, I can work on it :) |
Thank you @jorgefilipecosta! Please let me know if you have any question about the design and flow. |
An implementation was proposed in #25861. |
@joedolson The feature has just been merged 🎉 |
Just saw that earlier today; happy to see it! |
Description
To add, edit and delete subtitles in the video block, we need an UI.
Current Classic Editor:
A video tag can have multiple tracks elements.
A track element has 4 Attributes.
srclang
(Valid BCP 47 language tag)label
(Title for player UI)kind
(Captions, Chapters, Descriptions, Metadata or Subtitles)src
(URL of the text file)Related: #7501
The text was updated successfully, but these errors were encountered: