WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 9 months ago

#51929 new defect (bug)

Video links on Attachment pages

Reported by: ravipatel Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.6
Component: Media Keywords: has-patch needs-testing
Focuses: ui, css Cc:

Description

1) When i have click on this link.
https://prnt.sc/vvcm0w
2) Show me just a link then video, Also content width issue.
https://prnt.sc/vvclat

Attachments (3)

2021-unsupported-video-link.png (21.9 KB) - added by sabernhardt 10 months ago.
Twenty Twenty-One: unsupported video link on attachment page
2020-unsupported-video-link.png (31.8 KB) - added by sabernhardt 10 months ago.
Twenty Twenty: unsupported video link on attachment page
51929.diff (632 bytes) - added by sabernhardt 9 months ago.
wrapping unsupported video link with paragraph tag

Download all attachments as: .zip

Change History (11)

This ticket was mentioned in Slack in #core-css by ravi. View the logs.


10 months ago

#3 @sabernhardt
10 months ago

  • Component changed from Media to Bundled Theme
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Twenty Twenty-One : Attchment page - Video to Twenty Twenty-One: Video link on Attachment page
  • Version trunk deleted

The video does not show because the .mov format lacks support.
Default supported video formats are mp4, m4v, webm, ogv, and (currently) flv.

For the Twenty Twenty-One theme (and Twenty Twenty), the link is not centered like most content because it's only the link inside the entry-content. The link has no block element to be its container, where the max-width and auto margins would apply.

@sabernhardt
10 months ago

Twenty Twenty-One: unsupported video link on attachment page

@sabernhardt
10 months ago

Twenty Twenty: unsupported video link on attachment page

This ticket was mentioned in Slack in #core-media by ravi. View the logs.


10 months ago

This ticket was mentioned in Slack in #core-css by ravi. View the logs.


10 months ago

#6 @ravipatel
9 months ago

Code solutions

function custom_wp_video_extensions($types){
    $types[] = 'mov';
    return $types;
}
add_filter('wp_video_extensions','custom_wp_video_extensions');

Can we add default format list in wordpress or not?

function wp_get_video_extensions(){}

\wp-includes\media.php

#7 @desrosj
9 months ago

  • Version set to 5.6

@sabernhardt
9 months ago

wrapping unsupported video link with paragraph tag

#8 @sabernhardt
9 months ago

  • Component changed from Bundled Theme to Media
  • Keywords has-patch needs-testing added; needs-patch removed
  • Summary changed from Twenty Twenty-One: Video link on Attachment page to Video links on Attachment pages

Interestingly, the block editor does allow embedding MOV files, and they play for me in Windows browsers (Firefox, Chrome, Edge-Chromium, IE11). So it's not consistent within WordPress.

I still recommend converting video files to MP4 rather than using the filter to allow a less-supported format on individual sites.

For the issue of how the unsupported media links display on attachment pages, I'd prefer to address the link itself instead of theme-by-theme edits (returning ticket to the Media component). Would wrapping the link in a paragraph tag be acceptable? Twenty Twenty and Twenty Twenty-One would center the paragraph (with margins, not text-align).

Last edited 9 months ago by sabernhardt (previous) (diff)
Note: See TracTickets for help on using tickets.