Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#42039 closed enhancement (fixed)

Widgets: Enable oEmbed support for Video widget

Reported by: westonruter's profile westonruter Owned by: obenland's profile obenland
Milestone: 4.9 Priority: high
Severity: normal Version: 4.8
Component: Widgets Keywords: needs-patch
Focuses: Cc:

Description (last modified by westonruter)

With #34115 now resolved, we can now support oEmbeds in the video widget instead of limiting the widget to just playing what is supported by MediaElement.js. See previously #40935 where the video widget was explicitly limited to support YouTube and Vimeo since these were the only hosted video providers that MediaElement.js supported directly without needing to resort to oEmbed.

See #39994 for the introduction of the video widget.

Note also that oEmbeds are now supported in the rich Text widget as well, so there may need to be some changes done for that widget in particular to apply the same inject_video_max_width_style logic that the Video widget is applying now to the Video shortcode output.

Attachments (3)

42039.wip.diff (5.7 KB) - added by westonruter 7 years ago.
Work in progress to get another contributor started
42039.diff (5.4 KB) - added by obenland 7 years ago.
42039.2.diff (6.7 KB) - added by obenland 7 years ago.

Download all attachments as: .zip

Change History (18)

7 years ago

Work in progress to get another contributor started

#1 @westonruter
7 years ago

  • Description modified (diff)

#2 @westonruter
7 years ago

@timmydcrawford Is this something you'd be interested in picking back up to round out your work on the Video widget?

This ticket was mentioned in Slack in #core-media by westonruter. View the logs.

7 years ago

#4 @westonruter
7 years ago

  • Priority changed from normal to high

#5 @timmydcrawford
7 years ago

@westonruter what is the timeline for the task / when is it needed by? Sorry kind of unplugged from the 4.9 calendar.

#6 @westonruter
7 years ago

@timmydcrawford beta1 is due Wednesday (in 2 days), so that would be the timeline.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

7 years ago

This ticket was mentioned in Slack in #core by westonruter. View the logs.

7 years ago

#9 @westonruter
7 years ago

  • Owner set to obenland
  • Status changed from new to assigned

7 years ago

7 years ago

#10 @obenland
7 years ago

@westonruter @melchoyce What do you think of 42039.2.diff?

#11 @obenland
7 years ago

In 41759:

Widgets: Allow oEmbeds in video widget.

Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.

#12 @obenland
7 years ago

In 41765:

Widgets: Continue to use shortcode for some embeds

Renders YouTube and Vimeo embeds through WordPress' video shortcode.

See #42039.

#13 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

We can follow-up with fixing the rendering of the preview in a defect ticket.

#14 @westonruter
7 years ago

In 41827:

Widgets: Update video widget embed failure notice to indicate streams other than YouTube and Vimeo are allowed.

Amends [41759].
See #42039.

#15 @westonruter
7 years ago

In 41933:

Widgets: Harden logic for checking for valid media URLs.

  • Update deprecated isHostedVideo method to always return true since all oEmbeds are now supported.
  • Disable scanImage for non-image media widgets.
  • Ensure embed URL field element is matched from current media frame instance due to bug where media frames are not destroyed upon closing.
  • Update error message for invalid video URLs to ask user to check the URL for validity.

Props gk.loveweb, octalmage, westonruter.
See #42039, #40935.
Fixes #41052.

Note: See TracTickets for help on using tickets.