[wp-trac] [WordPress Trac] #40808: Media Widgets: VideoPress Uploads Not Functioning Correctly

WordPress Trac noreply at wordpress.org
Thu May 18 22:52:31 UTC 2017


#40808: Media Widgets: VideoPress Uploads Not Functioning Correctly
----------------------------+-----------------------------------------
 Reporter:  timmydcrawford  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  4.8
Component:  Widgets         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  javascript, administration
----------------------------+-----------------------------------------

Comment (by westonruter):

 @timmydcrawford what about if VideoPress did this:

 {{{#!js
 wp.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps
 = (function( originalMapMediaToModelProps ) {
         return function( mediaFrameProps ) {
                 var props = mediaFrameProps;
                 if ( mediaFrameProps.videopress_guid ) {
                         props = _.extend( {}, props, {
                                 url: 'https://videopress.com/v/' +
 mediaFrameProps.videopress_guid,
                                 attachment_id: 0,
                                 mp4: '' // @todo Would there be other file
 types returned?
                         });
                 }
                 return originalMapMediaToModelProps.call( this, props );
         };
 }(
 wp.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps
 ));
 }}}

 This would essentially force the selection of VideoPress attachment to be
 rewritten to be an external oEmbed.

 It's a somewhat interesting situation we have here because the video is
 simultaneously ''both'' an attachment in the media library ''and'' an
 external hosted video oEmbed. To me it seems the primary value of the
 video being in the media library is that it is available for easy
 reference, but that it doesn't really have any value beyond that.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40808#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list