WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 7 months ago

#31177 assigned defect (bug)

Captions video not saved with the post and are lost on attachment page

Reported by: rianrietveld Owned by: rianrietveld
Milestone: Future Release Priority: normal
Severity: normal Version: 4.1
Component: Media Keywords: needs-patch
Focuses: ui, accessibility Cc:

Description

At the moment you can add srt-captions and a poster image to a video, entering them while embedding a video in a post.

When you add a video via Add Media in a post the output will be something like:
[video poster="url-here/image.jpg" width="400" height="224" mp4="url-here/video.mp4"]<track srclang="en" label="English"kind="subtitles" src="url-here/captions.srt" />[/video]

This means that the poster and the captions are not stored with the attachment itself, so on attachment this data is lost pages and it is impossible to add a caption or a poster image via the image library.

It would be useful to save srt-captions and the poster with the attachment data itself, like the description and the caption now are.

Attachments (2)

Video details in edit post.png (74.7 KB) - added by rianrietveld 2 years ago.
Adding video details with a post
edit media in the library.png (298.9 KB) - added by rianrietveld 2 years ago.
Would be useful to add cations and poster here

Download all attachments as: .zip

Change History (13)

@rianrietveld
2 years ago

Adding video details with a post

@rianrietveld
2 years ago

Would be useful to add cations and poster here

#1 @rianrietveld
2 years ago

Text correction:
This means that the poster and the captions are not stored with the attachment itself, so on attachment pages this data is lost and it is impossible to add a caption or a poster image via the image library.

#3 @SergeyBiryukov
2 years ago

  • Component changed from Administration to Media

#4 @wonderboymusic
2 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Yeah, this is hard at the moment, will look at it

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


2 years ago

This ticket was mentioned in Slack in #accessibility by rianrietveld. View the logs.


2 years ago

#7 @GrahamArmfield
2 years ago

Here is my proposal for an ideal solution to this issue:

  1. When a user adds a video through the Add Media functionality, they should be allowed to also upload a caption file to accompany the video, or, to reference a previously uploaded caption file. An input field would be required for that.
  2. The URL of the caption file should be stored in the database against the video attachment - so in the post meta for the attachment.
  3. When user adds video that is already in the media library to page/post the URL of the caption for the video should be retrieved and presented to the user. Typically they would not change this, but they could. This URL will pass through into the HTML within the page/post.
  4. If user is within a page/post and wants to upload video they should also be able to upload or associate caption file with the video. As before, the URL for the caption file should be stored against the attachment rather than the page/post (as at present).

#8 @afercia
2 years ago

Makes perfectly sense, the caption file should be treated as video meta-data and be permanently stored and associated with the video. About the point 4. I think this is implemented right now but just for videos rendered with MediaelementJS.

#9 @rianrietveld
2 years ago

  • Owner set to rianrietveld
  • Status changed from new to assigned

#10 @rianrietveld
15 months ago

Working on this at WordCamp London and discussing this with @emirpprime, we should also take into account that the captions could be in more languages, so a kind of repeater field should be useful, and there should be a field to assign a language to a .srt file.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 months ago

Note: See TracTickets for help on using tickets.