From 6861353737e77fd79fc0b4c410beea703130ee02 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 1 Aug 2013 14:48:39 +0000 Subject: [PATCH] Set audio player to width: 100% and avoid breaking the layout in iOS when we fall back to a link. props markjaquith, davidjlaietta. fixes #24896. git-svn-id: http://core.svn.wordpress.org/trunk@24948 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/mediaelement/wp-mediaelement.css | 6 +++++- wp-includes/media.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/mediaelement/wp-mediaelement.css b/wp-includes/js/mediaelement/wp-mediaelement.css index 2160abf93c..18ad94855b 100644 --- a/wp-includes/js/mediaelement/wp-mediaelement.css +++ b/wp-includes/js/mediaelement/wp-mediaelement.css @@ -8,4 +8,8 @@ .mejs-controls .mejs-time-rail .mejs-time-current { background: #d54e21; -} \ No newline at end of file +} + +.me-cannotplay { + width: auto !important; +} diff --git a/wp-includes/media.php b/wp-includes/media.php index d85f10e829..6111f36370 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -910,6 +910,7 @@ function wp_audio_shortcode( $attr ) { 'loop' => $loop, 'autoplay' => $autoplay, 'preload' => $preload, + 'style' => 'width: 100%', ); // These ones should just be omitted altogether if they are blank