[wp-trac] [WordPress Trac] #56217: Missing item in wp_read_video_metadata()

WordPress Trac noreply at wordpress.org
Thu Jul 14 07:15:00 UTC 2022


#56217: Missing item in wp_read_video_metadata()
-------------------------+-----------------------------
 Reporter:  opajaap      |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:  6.0
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 wp_read_video_metadata() does not include ‘rotate’ in its return array. It
 would be nice to add it so the server can detect that width and height
 should be swapped in case of a portrait oriented video from a smartphone.

 Just adding:

 {{{
    if ( ! empty( $data['video']['rotate'] ) ) {
                 $metadata['rotate'] = $data['video']['rotate'];
    }
 }}}

 right after:


 {{{
    if ( ! empty( $data['audio'] ) ) {
         unset( $data['audio']['streams'] );
         $metadata['audio'] = $data['audio'];
    }
 }}}

 will do.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56217>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list