Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#24765 closed enhancement (fixed)

Allow more attributes to the audio / video shortcode

Reported by: jancbeck's profile jancbeck Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.6
Component: Shortcodes Keywords:
Focuses: Cc:

Description

width, height and poster are the only attributes applicable by the video shortcode. Audio supports no additional attributes at all.

The list of specified HTML5 attributes for audio and video can be found here:
http://www.whatwg.org/specs/web-apps/current-work/#audio
http://www.whatwg.org/specs/web-apps/current-work/#video

Imho preload, autoplay, loop, muted and controls are attributes users should be able to set.

Currently both shortcode functions hardcode in controls="controls" preload="none"with no way to replace them other than regex'ing the output.

The wp_audio_shortcode filter has access to $atts but that's not the original list of attributes specified in the shortcode (look a few lines up where $atts is redefined).

Attachments (1)

more-video-attributes.24765.diff (1.5 KB) - added by jancbeck 11 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
11 years ago

The wp_audio_shortcode filter has access to $atts but that's not the original list of attributes specified in the shortcode (look a few lines up where $atts is redefined).

Related: #25312

#2 @Frank Klein
10 years ago

  • Cc contact@… added

#3 @wonderboymusic
10 years ago

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

controls and muted should not really be used in the shortcode. Volume can be controlled by overriding the initial MEjs parameters since [28370]. All of the other attributes are supported now.

#4 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.