[wp-trac] [WordPress Trac] #40808: Media Widgets: VideoPress Uploads Not Functioning Correctly
WordPress Trac
noreply at wordpress.org
Fri May 19 23:19:34 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: has-patch | Focuses: javascript, administration
----------------------------+-----------------------------------------
Changes (by westonruter):
* keywords: needs-patch => has-patch
Comment:
@timmydcrawford great, so then the VideoPress plugin would need to enqueue
JS that extends `media-video-widget` with something like:
{{{#!js
wp.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo =
(function( isHostedVideo ) {
return function( url ) {
var parsedUrl = document.createElement( 'a' );
parsedUrl.href = url;
if ( 'videos.files.wordpress.com' === parsedUrl.hostname
|| 'videopress.com' === parsedUrl.hostname ) {
return true;
}
return isHostedVideo.call( this, props );
};
}( wp.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo
));
}}}
Right?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40808#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list