#36284 closed defect (bug) (invalid)
Video shortcode should exclusively use the 'src' attribute for the video URL
Reported by: | gnotaras | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
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="http://example.com/uploads/video.mp4"][/video]
This makes absolutely no sense. The expected would be:
[video width="480" height="360" src="http://example.com/uploads/video.mp4"][/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)
#2
@
9 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.
#3
@
9 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.
But how to you want to handle multiple sources for one video?