[wp-trac] [WordPress Trac] #40144: Media: Unable to selectively opt for MediaElement.js for just audio or video shortcodes

WordPress Trac noreply at wordpress.org
Thu Jan 12 00:56:43 UTC 2023


#40144: Media: Unable to selectively opt for MediaElement.js for just audio or
video shortcodes
--------------------------+------------------------
 Reporter:  westonruter   |       Owner:  joedolson
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  6.2
Component:  Media         |     Version:  3.6
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------

Comment (by joedolson):

 Testing instructions:

 - Create a post in the classic editor
 - Add an audio file and a video file using the [audio] and [video]
 shortcodes.
 - Add the two filters

 {{{
 add_filter( 'wp_video_shortcode_library', function(){ return
 'some_other_library'; } );
 add_filter( 'wp_audio_shortcode_library', function(){ return
 'some_other_library'; } );
 }}}

 Test once with both filters available; once with only one filter enabled;
 one with the other filter enabled.

 Before patch:

 - Both filters: both audio and video fall back to native players.
 - Audio filter: both audio and video fall back to native players.
 - Video filter: both audio and video fall back to native players.

 After patch:

 - Both filters: both audio and video fall back to native players.
 - Audio filter: Audio player falls back to native player.
 - Video filter: Video player falls back to native player.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40144#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list