Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
I have a sermon podcast powered by WordPress located at http://www.summitnorthwest.org/sermonvideo/.

Clicking on "Play Video" runs a javascript that pops open a little window and loads a flash player to watch the video. This has worked fine for years... I just recently noticed that Chrome on Windows 7 does not display the flash player. It's not that it doesn't work properly or bugs out--it just doesn't even show up in the first place. Can someone else confirm this to be the case? And if so, how can I fix this?

Play Video link code:
Code:
<a href="http://blip.tv/file/get/Summitnorthwest-LivingTheGospel375.flv" onclick="javascript:flvplayer(this.href,'1'); return false;" target="_blank">Play Video</a>

Back-end Javascript code that creates popup window:
Code:
// Pop-Up Embedder Script by David Battino, www.batmosphere.com
// Version 2006-05-31  
// OK to use if this notice is included

function flvplayer(filepath,WindowNumber) 
{
    PlayerWin = window.open('',WindowNumber,'width=350,height=315,top=75,left=75,screenX=75,screenY=75,resizable=1,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');

    PlayerWin.focus();
    PlayerWin.document.writeln("<html><head><title>Video Sermon Player</title></head>");
    PlayerWin.document.writeln("<body bgcolor='#000000'>"); // specify background img if desired
    PlayerWin.document.writeln("<div align='center' style='margin: 0;'>");
    PlayerWin.document.writeln("<embed src='http://www.summitnorthwest.org/sermons/mediaplayer/player.swf' width='95%' height='80%' allowscriptaccess='always' allowfullscreen='true' flashvars='file=" + filepath + "&autostart=true&fullscreen=true&skin=http://www.summitnorthwest.org/sermons/mediaplayer/nacht_skin.swf' />");
    PlayerWin.document.writeln("</div>");
    PlayerWin.document.writeln("<form style='margin: 0;'><div align='center' style='margin: 5px 0 0 0;'><input type='button' value='Close this window' onclick='javascript:window.close();' style='margin-bottom: 5px'><br /><font color='#cccccc' size='1'>Not working? <a href='http://get.adobe.com/flashplayer/' target='_blank'><font color='#cccccc'>Get Adobe Flash Player</font></a></font></div></form>");
    PlayerWin.document.writeln("</body></html>");

    PlayerWin.document.close(); // "Finalizes" new window
}

player.swf is a JW Player--probably a couple years old by this point.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
This is a Chrome issue.

Add wmode='opaque' to your embed tag. It's an internal Z-index issue between the video player and the window Chrome opens.

On a side note, I'd like to throw this in as well:

Personally I try to avoid using percentage values for embed width or height attributes as the video scales poorly more times than not and static values always work better for me across all the browser platforms - regardless of any documentation on W3C attribute usage. Personal opinion, not a rule of law.

-jim
 

Brendon Bauer

macrumors 6502
Original poster
May 14, 2007
344
0
Good 'ol USofA
Thank you! That did the trick.

As far as the percentages go, I did that so I could have the video resize to fill the window if a user resized the window. That way they aren't stuck with one size and full screen, but can adjust the video player to a size of their choice.

Brendon
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
RE: percentages

Yep, I understand. What I like to do is allow selection of 2-3 different sizes scaled up, plus fullscreen. This gives the user more control and if you select common formats such as original, 320x240, 640x480, etc. the videos scale with less distortion (artifacts/errors) on some monitors. Just an FYI to better explain why I made the suggestion, no need to reply.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.