Opened 9 years ago
Closed 9 years ago
#36204 closed defect (bug) (worksforme)
Video Shortcode Parameter Inconsistencies
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | needs-patch |
Focuses: | javascript | Cc: |
Description
When injecting a [video]
shortcode via the "Add Media" modal on an edit post screen, it initially goes in as:
[video width="1280" height="720" mp4="http://src.wordpress-develop.dev/wp-content/uploads/2016/02/happy-dance.mp4"][/video]
but as soon as you edit it via the "Video Details" modal on the embed, the shortcode then becomes
[video width="1280" height="720" mp4="http://src.wordpress-develop.dev/wp-content/uploads/2016/02/happy-dance.mp4" id="17" src="" poster="" loop="false" autoplay="false" preload="metadata"][/video]
adding in the id
, src
, poster
, loop
, autoplay
, and preload
keys.
The post-insertion shortcode creation is handled by https://core.trac.wordpress.org/browser/trunk/src/wp-includes/js/media/audiovideo.manifest.js?rev=33337#L153 -- but I'm not certain where the initial shortcode creation is generated.
According to the wp.media.video.shortcode()
method, it looks like all the items that match the defaults should be getting omitted, but that doesn't seem to be the case.
Change History (2)
Note: See
TracTickets for help on using
tickets.
@georgestephanis can't reproduce, not sure what the problem was but ... trunk