Hey, thanks to the maintainer for the great contribution!

I'm struggling to find out where in the code I could put in a wmode="transparent" to ensure that flash content doesn't appear in front of divs I've set to a higher z-index. Any help would be much appreciated.

CommentFileSizeAuthor
#3 oembed_wmode.patch2.09 KBeffulgentsia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pribeh’s picture

Oh, I should mention that I'm using the input filter and not the oembed field. Although, it would be good to provide a solution for both.

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

For this, the oembed provider must support this wmode option. It lies outside the oEmbed specification.

However, embed.ly and vimeo have documented support for it.

In Drupal 7, the filter allows you to pass in options with an alternate syntax, so you could do: [embed wmode="xyz"]http://vimeo.com/something[/embed]

However, this is not part of Drupal 6 at this time. It could be backported though.

Another method to support this is to implement hook_oembed_request_alter() and simply add wmode to every request. This would probably work, because providers who don't support this property would ignore it. However, you'd have to accept that the same wmode property value would be used for all oEmbed requests. This would work in Drupal 6 and Drupal 7.

/**
 * Implement hook_oembed_request_alter().
 */
function YOURMODULE_oembed_request_alter(&$attributes, &$provider, $url) {
  $attributes['wmode'] = 'a value';
}
effulgentsia’s picture

Version: 6.x-0.x-dev » 7.x-0.x-dev
Status: Postponed (maintainer needs more info) » Needs review
FileSize
2.09 KB

Well, let's at least build in support for media_oembed. Patch attached. Though the parameter isn't part of the oEmbed specification, http://oembed.com/ does say Providers should ignore all other arguments it doesn't expect. Providers are welcome to support custom additional parameters, and embed.ly and common video providers support wmode, so I think it makes sense to add it here without worrying about making it provider-specific logic.

Also, this patch defaults the new setting to 'opaque' rather than the #empty_option, because I think Drupal site builders are more likely to expect layering to work than they are to be in situations where letting Flash use its default wmode (window) has significant benefit. For example, see discussion at #971392: Flash content on the underlying page shows up on top of the overlay and toolbar.

Anonymous’s picture

Status: Needs review » Fixed

Committed. This patch only affects oembed output that passes through the file entity module's display process.

For the input filter, you simply need to add wmode="opaque" to the input format's settings for this filter.

Link field formatters are out in the cold on this one. Re-open it if you have a patch to bring wmodes to the link field formatter, but link field formatters are a little Drupal Sixy IMHO.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.