WordPress.org

Make WordPress Core

Changeset 24951


Ignore:
Timestamp:
08/01/2013 03:42:03 PM (8 years ago)
Author:
nacin
Message:

On the about page, only serve Opera mp4. Pre-Chromium Opera and MediaElement.js doesn't load ogv (video/ogg). see #24832.

Merges [24950] to the 3.6 branch.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-admin/about.php

    r24943 r24951  
    7676
    7777    <div class="feature-section images-stagger-right">
    78         <div class="video image-66"><?php echo wp_video_shortcode(
    79             array(
    80                 'mp4' => (is_ssl() ? 'https://' : 'http://s.' ) . 'wordpress.org/images/core/3.6/sample-video.mp4',
    81                 'ogv' => (is_ssl() ? 'https://' : 'http://s.' ) . 'wordpress.org/images/core/3.6/sample-video.ogv',
     78        <div class="video image-66"><?php
     79            $sample_video = ( is_ssl() ? 'https://' : 'http://s.' ) . 'wordpress.org/images/core/3.6/sample-video';
     80            $args = array(
     81                'mp4' => "$sample_video.mp4",
     82                'ogv' => "$sample_video.ogv",
    8283                'width' => 625,
    8384                'height' => 360,
    84             )
    85         ); ?></div>
     85            );
     86            // Opera 12 (Presto, pre-Chromium) fails to load ogv properly
     87            // when combined with ME.js. Works fine in Opera 15.
     88            // Don't serve ogv to Opera 12 to avoid complete brokeness.
     89            if ( $GLOBALS['is_opera'] )
     90                unset( $args['ogv'] );
     91            // Our current ME.js API is limited to shortcodes in posts.
     92            echo wp_video_shortcode( $args );
     93        ?></div>
    8694        <h4><?php _e( 'New Media Player' ); ?></h4>
    8795        <p><?php _e( 'Share your audio and video with the new built-in HTML5 media player. Upload files using the media manager and embed them in your posts.' ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.