WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#24798 closed defect (bug) (fixed)

Videos never load in Safari Mac with new MediaElement wrapper

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

Description

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)

comment:1 nacin9 months 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?

comment:2 dcavins9 months 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. :)

comment:3 markjaquith9 months 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).

comment:4 nacin9 months ago

Related: the MediaElement.js WordPress plugin (http://wordpress.org/plugins/media-element-html5-video-and-audio-player/) 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.)

comment:5 dcavins9 months ago

Mark-

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,

-David

comment:6 markjaquith9 months 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.

comment:7 dcavins9 months 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?

Thanks,

-David

comment:8 follow-up: wonderboymusic9 months ago

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

comment:9 in reply to: ↑ 8 dcavins9 months 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.