Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24798 closed defect (bug) (fixed)

Videos never load in Safari Mac with new MediaElement wrapper

Reported by: dcavins's profile dcavins Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: normal
Severity: minor Version: 3.6
Component: Media Keywords:
Focuses: Cc:


When I use the new video shortcode with my test copy of WP 3.6-RC1-24717, the resulting video object fails to play on Safari (6.0.5) for Mac (10.8.4). I'm using this format:

[video width="600" height="480" mp4="sample.mp4" ogv="sample-sm.ogv" webm="sample-sm.webm"]

The video player shows up ok, but after clicking play, the loading spinner just spins. I've found that if I change the preload attribute in the video object from none to auto or metadata it plays as expected.

Change History (9)

#1 @nacin
10 years ago

I don't know why this is the case, but if necessary, metadata is probably a pretty light payload and would be okay to fall back to.

Does this affect the audio shortcode as well?

#2 @dcavins
10 years ago

The audio player works as expected for me. (The audio object also has the attribute preload="none".)

Thanks for looking into this. I wish that the audio/video standards on the web weren't a wreck, but I really appreciate that people like wonderboymusic have tried to pull something useful from the wreckage. :)

#3 @markjaquith
10 years ago

  • Milestone changed from Awaiting Review to 3.6

Confirmed. Also confirmed that the order of the sources doesn't matter (I had a hunch, I was wrong).

#4 @nacin
10 years ago

Related: the MediaElement.js WordPress plugin ( supports a few extra shortcode attributes including preload. I think we should probably support any shortcode attributes that correspond directly to an HTML5 video or audio element's attribute. (I wouldn't want to support anything specific to ME.js to remain agnostic.)

#5 @dcavins
10 years ago


That was a good thought about the order. I'm not sure it's still the case, but I started using the html5 audio element pretty early on. What I found was that if the order was mp3 then ogg, Firefox wouldn't play. However, changing to ogg then mp3 caused it to work as expected.

Thanks again for looking into this problem,


#6 @markjaquith
10 years ago

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

In 24789:

Fix some sizing issues with video embeds, and improve video/audio embed shortcode flexibility.

  • loop, autoplay, and preload are now available via the shortcode. Use them non-annoyingly, please!
  • Attributes that pass through the filters are now proper key/value pairs, not an array of key="value" strings.
  • preload defaults to metadata for videos. This fixes the vertical video preview and Safari ogv/webm playback issues.
  • Wrap a div around video embeds to combat a ME.js issue with responsive width=100% themes. Props kovshenin.

Fixes #24134, #24798.

#7 @dcavins
10 years ago

Hi Mark-

I'm using the nightly builds, and if I insert a video without specifying preload, it's still returning preload="none". I am able to specify metadata in the shortcode:

[video mp4="sample.mp4" preload="metadata"]

and the results are good. Could I not be using the latest code somehow?



#8 follow-up: @wonderboymusic
10 years ago

In your last comment on #24971, you were using the plugin, not core code. turn the plugin off and try again.

#9 in reply to: ↑ 8 @dcavins
10 years ago

Replying to wonderboymusic:

In your last comment on #24971, you were using the plugin, not core code. turn the plugin off and try again.

Yes. Same problem, same result. Sorry for the false report. :/

Thanks for all your hard work in bringing media handling to WordPress, wonderboymusic. It's much appreciated.

Note: See TracTickets for help on using tickets.