Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#24902 closed defect (bug) (fixed)

video/audio elements not recognized in IE6-8 even with MediaElement.js

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 3.6 Priority: normal
Severity: critical Version:
Component: Media Keywords:
Focuses: Cc:

Description

http://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2013-07-31&sort=asc#m653229

We need to do a poor man's HTML5 shiv for the audio and video elements whenever we want to use them.

wp-mediaelement.js is too late — it *must* occur prior to the element in the DOM.

Attachments (4)

24902.diff (1.8 KB) - added by nacin 12 years ago.
24902.2.diff (1.9 KB) - added by nacin 12 years ago.
24902.3.diff (580 bytes) - added by wonderboymusic 12 years ago.
24902.4.diff (1.5 KB) - added by azaozz 12 years ago.

Download all attachments as: .zip

Change History (13)

#1 @ocean90
12 years ago

echo "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->";

for wp_video_shortcode and

echo "<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->";

for wp_audio_shortcode.

Last edited 12 years ago by ocean90 (previous) (diff)

@nacin
12 years ago

@nacin
12 years ago

#2 @nacin
12 years ago

In 24931:

When rendering an audio or video shortcode in IE 6-8, call document.createElement() as a poor man's HTML5 shiv. see #24902.

#3 @nacin
12 years ago

In 24932:

When rendering an audio or video shortcode in IE 6-8, call document.createElement() as a poor man's HTML5 shiv. see #24902.

Merges [24931] to the 3.6 branch.

#4 @ocean90
12 years ago

The other issue could be tracked down too...

There are differences between SCRIPT_DEBUG on and off. If on all is fine, if not, the sky is falling down.

SCRIPT_DEBUG false: <param name="source" value="silverlightmediaelement.xap"/>
SCRIPT_DEBUG true: <param name="source" value="http://example.com/wp-includes/js/mediaelement/silverlightmediaelement.xap"/>

Why? That's why!
It's going through all <script> and tries to find mediaelement-and-player.*. Because it's going through load-scripts.php as ?load=foo,bar,wp-mediaelement it can't find it.

Solution: Set pluginPath, see 24902.3.diff (We will do it in a better way without hardcoding it.)

@azaozz
12 years ago

#5 @azaozz
12 years ago

24902.4.diff fixes the issues with the missing path to the mediaelement directory when scripts are concatenated.

#6 @aaroncampbell
12 years ago

Just getting home and testing all this. The changes in [24931] and [24932] seem to make the video play as expected for me in IE 7-9 (it uses Flash and without Flash it falls back to a download link in a box).

For the SCRIPT_DEBUG issue, 24902.4.diff works for me but .3 did not.

#7 @aaroncampbell
12 years ago

I caught up on all the IRC logs and everything finally. The .3 patch didn't work for me because my install wasn't in root. Still, .4 is working really well here. I tested it in IE 7 and 8 in XP and in IE 9 and 10 on Windows 7.

#8 @nacin
12 years ago

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

In 24940:

Pass pluginPath to MediaElement.js, fixing playback when ME.js is served through load-scripts.php.

props ocean90, wonderboymusic, azaozz.
fixes #24902.

#9 @nacin
12 years ago

In 24941:

Pass pluginPath to MediaElement.js, fixing playback when ME.js is served through load-scripts.php.

Merges [24940] to the 3.6 branch.

props ocean90, wonderboymusic, azaozz.
fixes #24902.

Note: See TracTickets for help on using tickets.