Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29707 closed defect (bug) (worksforme)

Native Audio Player

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

Description (last modified by johnbillion)

The native audio player is defaulted to 'visibility: hidden'. This bug was also in the previous versions of wordpress and when I upgraded to 4.0 all audio in my posts went missing.

The fix is to edit media.php and search the style and delete the 'visibility:hidden'

wp-includes/media.php

$html_atts = array(
                'class'    => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
                'id'       => sprintf( 'audio-%d-%d', $post_id, $instances ),
                'loop'     => $atts['loop'],
                'autoplay' => $atts['autoplay'],
                'preload'  => $atts['preload'],
                'style'    => '/* width: 300px; */',  <------ visibility:hidden was here
);

Change History (3)

#1 @johnbillion
10 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added

Thanks for the report.

The audio player is made visible by the MediaElement.js JavaScript which is enqueued when audio or video is embedded in a post. If this is not happening then there may be an issue with your theme, or with a plugin on your site, or with your browser.

Can you try deactivating the plugins on your site and switching to the default theme and seeing if the problem persists?

#3 @wonderboymusic
10 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This is because the MediaElement CSS is loaded in the footer. The native audio player is hidden by MEjs as well. This is undoubtedly a plugin or theme causing a JS error.

Note: See TracTickets for help on using tickets.