2

I've solved this on other browsers by adding wmode: opaque and using swfobject to stay on the modern side of the web.

Safari still renders it on top of everything. Why?

<script type="text/javascript">
    var url = 'http://www.youtube.com/v/blablabla',
        atts = {
            id: "ytplayer"
        },
        params = {
            allowScriptAccess: "always",
            wmode: 'opaque',
            rel: 0,
            enablejsapi: 1
        };

    swfobject.embedSWF(url, atts.id, "640", "390", "9.0.0", null, null, params, atts);
</script>

<div class="youTube">
    <div id="ytplayer"></div>
</div>

Note that I have looked at related YouTube Video Embedded via iframe Ignoring z-index?; but this question is Firefox-specific, and I have actually tried the accepted answer to that question with no luck.

Community
  • 1
  • 1
Szymon Toda
  • 4,454
  • 11
  • 43
  • 62
  • possible duplicate of [YouTube Video Embedded via iframe Ignoring z-index?](http://stackoverflow.com/questions/9074365/youtube-video-embedded-via-iframe-ignoring-z-index) – TylerH Oct 28 '14 at 13:13
  • 1
    It's not duplicate as issue is just in Firefox, and as you can see I've already used answers from it (`opaque mode`). – Szymon Toda Oct 28 '14 at 15:25
  • Just one "stupid" question - why not using HTML5? Flash and Safari can cause a lot of problems :) – nettutvikler Nov 04 '14 at 15:13
  • Well I dont know HTML5 in matter of browser support. Using `swfobject` for it's clear configurability in code (to avoid messing with HTML), am not sure is HTML5 API has same possibilities. If supported in IE7 and has callback functions for onloadbegin, onloadcomplete, player events than I will happily take answer with link to docs ;-) – Szymon Toda Nov 04 '14 at 16:46
  • The title says Safari but then at the bottom you say Firefox-specific, so I'm a bit confused? I've started moving away from Flash to XHTML5 audio/video though I can give you some suggestions if you can tell me what browser(s)/version(s) you're having trouble with please? Also I'm Polish too. :-) – John Nov 10 '14 at 01:26
  • 1
    Normal Safari or Mobile Safari? And which version? – lapin Nov 11 '14 at 02:59
  • @lapin Newest Safari, error occurs just on Windows – Szymon Toda Nov 12 '14 at 11:45

2 Answers2

0

wmode should be the first option in the url so also the first in params.

Dummy question: have you tried to add ?wmode=transparent at the end of your youtube url like in YouTube Video Embedded via iframe Ignoring z-index?

more about the issue: http://helpx.adobe.com/x-productkb/multi/swf-file-ignores-stacking-order.html

Community
  • 1
  • 1
doxav
  • 978
  • 8
  • 14
  • Why wmode has to be first? Yes, tried transparent mode, no effect. – Szymon Toda Nov 05 '14 at 00:35
  • because it happened not to be considered. If you also tried the dummy suggestiob, according to adobe (link above) your safari version won't allow a trivial solution. – doxav Nov 05 '14 at 06:40
0

I suspect your version of Safari has a bug, which not lets to use wmode parameter correctly. There's a very old article about older Safari version with same bug.

It suggest to use alternative content instead of Flash for Safari.

Roman
  • 189
  • 1
  • 6