Ticket #11436 (reopened enhancement)

Opened 2 years ago

Last modified 8 months ago

Adding wmode transparent to flash videos

Reported by: aldolat Owned by: Viper007Bond
Priority: high Milestone: Awaiting Review
Component: Embeds Version: 2.9
Severity: normal Keywords: has-patch
Cc:

Description

WP 2.9 should add this line

<param name='wmode' value='transparent' />

among other params inside the object tag when inserting a video from Youtube and others sites.

Also, it should add

<embed ... wmode="transparent" ... >

in the the embed tag.

While these parameters are already present in the press-this.php file, the standard writing panel doesn't include them.

If these declarations are not present, the video overlaps another element in the page that should be on top of others elements (such as a dropdown menu that would be hidden by a flash video).

Attachments

11436.patch Download (524 bytes) - added by SergeyBiryukov 12 months ago.
11436.2.patch Download (681 bytes) - added by SergeyBiryukov 12 months ago.
Added check if wmode is already set.
11436.3.patch Download (638 bytes) - added by hakre 12 months ago.

Change History

  • Priority changed from normal to high
  • Milestone changed from Unassigned to 3.0

+1. It's a true annoyance when it's not present. We should also add it when code returned by oembed doesn't add it already.

Keep in mind that wmode="transparent" does use more reources on the client's system than the opaque variant.

  • Keywords reporter-feedback added

Please provide steps on how to reproduce that it's not inserted right now.

Step 1 When you want to publish a video from Youtube (for example), you paste the URL to the video. So paste this into the writing panel:  http://www.youtube.com/watch?v=tgbNymZ7vqY

Step 2 Publish the post.

Step 3 Go to your blog. The video appears above any other element, such as a dropdown menu. If your wordpress theme has a dropdown menu, it should appear above the video, not below. Here a screenshot:  http://www.mediafire.com/imageview.php?quickkey=zy0yzq0njjy

  • Keywords needs-patch added; reporter-feedback removed

Could reproduce. Is this only for oembed or are there other areas that should be considered to care by a patch.

  • Type changed from defect (bug) to enhancement

there are plentiful other areas. basically, anything that potentially adds an object tag is subject to this.

an additional improvement, while we're at it, could be to automatically use SWFObject.

  • Owner set to Viper007Bond
  • Status changed from new to assigned
  • Component changed from Media to Embeds

I'm strongly tempted to wontfix this. I'm not sure we should try to mess with oembed responses and should leave it to a plugin for when the oembed provider doesn't include it.

Yes, opaque is better than transparent.

I'm on the fence on this one though. oEmbed exists so we don't have to mess around with the embed HTML. YouTube also doesn't provide this parameter in their embed HTML anywhere, even on the standard video page where you copy/paste it. They used to have it, but removed it as it is generally considered a harmful parameter unless you absolutely need it. This is because the wmode parameter makes the player inaccessible to keyboard users (they can't tab into it and it's controls).

On the other hand, this can be a really annoying issue. I'm making the new version of my Video Quicktags plugin have an option to add the wmode parameter for example

I think I'm going to recommend wontfix with the reasoning being that YouTube knows what they are doing and it's easy for a plugin to fix this using the embed_oembed_html filter.

comment:11 follow-up: ↓ 14   aldolat2 years ago

I agree. But how about adding this option into WordPress?

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

aldolat: A plugin can easily handle this by using a filter that currently exists in WordPress and hooking into and 'filtering' the HTML.

  • Milestone 3.0 deleted

comment:14 in reply to: ↑ 11   Viper007Bond2 years ago

Replying to aldolat:

I agree. But how about adding this option into WordPress?

Too many options is a bad thing. You get lost in them all. WordPress aims to only provide a UI for the really important things and leave the rest to filters which plugins can use to change things.

Admin Bar makes this more apparent: #16537

Does it make sense to add wmode only if Admin Bar is displayed? Attaching the patch.

Should this get re-opened considering #16537?

  • Keywords has-patch added; needs-patch removed
  • Status changed from closed to reopened
  • Resolution wontfix deleted

Reopening for consideration, as per the comments above.

  • Milestone set to Awaiting Review

Added check if wmode is already set.

hakre12 months ago

@SergeyBiryukov: My review of your last patch.

not only the admin bar was having this problem but also the window of posting images and etc. I have this patch is going to be released in 3.2 :D

Note: See TracTickets for help on using tickets.