Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36284 closed defect (bug) (invalid)

Video shortcode should exclusively use the 'src' attribute for the video URL

Reported by: gnotaras's profile gnotaras Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: Cc:


I notice that when adding videos to the content using the 'Add Media' dialog, the URL of the video is added to an attribute named after the video's extension. For instance:

[video width="480" height="360" mp4=""][/video]

This makes absolutely no sense. The expected would be:

[video width="480" height="360" src=""][/video]

The problem with using an attribute named mp4 is that, if you try to process the $attr array as passed to the wp_video_shortcode_override filter, things stop making any sense as you have to guess the attribute name based on a URL that is the value of that attribute!

Change History (4)

#1 @ocean90
8 years ago

  • Component changed from General to Media

But how to you want to handle multiple sources for one video?

#2 @gnotaras
8 years ago

Yeap, that's right. I'm starting to rethink about it..

BTW, this is also the case on the audio shortcode.

I think passing the attachment ID to the filtering function would solve many problems.

Last edited 8 years ago by gnotaras (previous) (diff)

#3 @gnotaras
8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I'm trying to think about how this could be resolved, but the support for multiple sources makes it very complicated. I had not taken this into account when submitting the original bug report.

If multiple sources are taken into account, using the audio/video type as an attribute name makes a lot of sense.

So, after some investigation, I will now close my bug report as invalid.

#4 @DrewAPicture
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.