Widgets: Allow oEmbeds in video widget.

Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland
2017-10-05 00:21:27 +00:00
parent 64a36e4119
commit 75ce48ef70
4 changed files with 41 additions and 38 deletions
@@ -34,12 +34,6 @@
equal( mappedProps.title, undefined, 'mapMediaToModelProps should ignore title inputs' );
equal( mappedProps.loop, false, 'mapMediaToModelProps should set loop' );
equal( mappedProps.preload, 'meta', 'mapMediaToModelProps should set preload' );
// Test isHostedVideo().
equal( videoWidgetControlInstance.isHostedVideo( 'https://www.youtube.com/watch?v=OQSNhk5ICTI' ), true, 'isHostedVideo should return true for full YouTube url.' );
equal( videoWidgetControlInstance.isHostedVideo( 'https://youtu.be/OQSNhk5ICTI' ), true, 'isHostedVideo should return true for shortened youtube url' );
equal( videoWidgetControlInstance.isHostedVideo( 'https://vimeo.com/190372437' ), true, 'isHostedVideo should return true for vimeo url.' );
equal( videoWidgetControlInstance.isHostedVideo( 'https://wordpress.org/' ), false, 'isHostedVideo should return false for non-supported video url.' );
});
test( 'video widget control renderPreview', function( assert ) {