WordPress.org

Ready to get started?Download WordPress

Forums

Responsive Video Embeds
[resolved] Can z-index fix wit wmode="opaque" be incorporated? (2 posts)

  1. Josien
    Member
    Posted 1 year ago #

    Hi Kevin,

    I really like this plugin because it also resizes videos in my mobile browser. Before I installed this plugin I pasted in the iframe code of youtube videos and appended the link with ?wmode="transparent" and added wmode="opaque". This is done because the youtube videos otherwise ignore the z-index in ie and firefox.

    Would it be possible to change some code in your plugin so that it takes care of this?

    http://wordpress.org/extend/plugins/responsive-video-embeds/

  2. Kevin Leary
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for the feedback Josien,

    I'll add this good suggestion to my dev backlog. In the interim, here's a bit of JS that you can load on document.ready to patch the problem until the next release:

    $('iframe[src*="youtube.com"]').each(function() {
      var url = $(this).attr("src");
      if ($(this).attr("src").indexOf("?") > 0) {
        $(this).attr({
          "src" : url + "&wmode=transparent",
          "wmode" : "Opaque"
        });
      }
      else {
        $(this).attr({
          "src" : url + "?wmode=transparent",
          "wmode" : "Opaque"
        });
      }
    });

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic