• 0

DMS 2 Embedded swf object (Youtube) in MediaBox not displaying in Firefox


Question

Posted · Report post

Hi

 

I have had this problem for days of my swf object not displaying in Firefox. It works in all other browsers. I am using the Youtube JavaScript API in a MediaBox. I've tried countless solutions to no avail. I'm desperate at this stage. I don't want to just use an IFrame embed code because I want the video to be muted and I can only do that using the JS API. Maybe it's got something to do with the MediaBox CSS and the way FF loads pages? That's the hint I'm getting from looking at others with a similar problem.

 

Any help would be much appreciated. I'll post the JS code here if you want but here's a link to the page : http://cavistons.com/home-desktop-switch/?w3tc_note=pgcache_purge_post

 

Thanks

 

Share this post


Link to post
Share on other sites

20 answers to this question

  • 0

Posted · Report post

Just thought I'd let you guys know that I found a solution to this problem.

 

I used the masthead section to add the video, and used a bit of custom CSS (negative margins) to get rid of the extra space for text and buttons cos I just wanted the video.

 

Before, with the mediabox, the video was displaying in FF on Mac, but not Windows. Now it displays (and autoplays on mute) in all browsers I've tried :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Have you tried the PL next box section rather than the media box? 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I assume you mean text box. I tried it and that fixed the display issue. The video shows up in all browsers, but does not autoplay in any browser (with the exact same code). Why does it autoplay in the mediabox and not in the text box? And why does it not show up in the mediabox in FF?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

seatangltd No - Martin means PL NextBox. Go to your pagelines account and you will see it was last months developer only plugin. Download and upload to your WP plugins and then the new PLNextBox section will appear in your 'Add to Page'

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

GetMeWebDesign I can't see the PL NextBox  anywhere in my account.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

seatangltd. You had better email hello @ pagelines dot com with you account details and they will have a look at that for you

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

@GetMeWebDesign I assume it's because I don't have the developer-only subscription... is there any other solution to my problem you can offer?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ahhhhh. Then, I am afraid I am not familiar with what you do and dont get without that, but I am also not really familiar with do what you ask. My guess would be to use Browser specific CSS and put up with it being different on FF until someone who knows more about this comes along to help... Nice site, by the way :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

How are you adding the video to the media file, can you provide a screenshot of your MediaBox settings please. Also, can you provide the code you're using or where you got the code from please.

 

Also if I use the old embed code in a MediaBox, then the video displays just fine in both Chrome and FireFox.

 

https://cloudup.com/cDoP_vgWZIc

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

GetMeWebDesign Thank you.

 

Danny Here's my mediabox settings: http://grab.by/wtEk

 

Here's my code:

 

<script src="http://www.google.com/jsapi"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
<script type="text/javascript">
google.load("swfobject", "2.1");
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("ytplayer");
ytplayer.playVideo();
ytplayer.mute();
}
var params = { allowScriptAccess: "always" };
var atts = { id: "ytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/wf7AQHq0bpM?rel=0&enablejsapi=1&playerapiid=ytplayer&allowFullScreen=true&version=3&showinfo=0&modestbranding=1", "ytapiplayer", "650", "400", "8", null, null, params, atts);
</script>

I'm not using the old embed code because I want the video to autoplay on mute, and I can only do that using the JavaScript API.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Working for me in FireFox without any issue. https://cloudup.com/cjZ9BHxMEiC

 

However, I have not added all that code to the MediaBox. Here is what I did:

 

Add the following scripts:

 

<script src="http://www.google.com/jsapi"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

 

To the DMS Toolbar > Custom > Scripts editor

 

Then add the remaining code to your MediaBox.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny Hmmm... I did what you said and after a refresh I got this http://grab.by/wtUA , which is very odd because the layout is stretched, some custom CSS hasn't been applied and there is no header menu, but the video works. Then I refreshed again and I'm back to where I was before (correct layout), with no video.  It seems like FF hasn't loaded the page fully the first time, and the fact that it displays the video in that case is intriguing. Any thoughts on that?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am not seeing your issue on my FireFox - https://cloudup.com/cvOakSeTxXb

 

However, I am not sure as to why you have a cache plugin installed and activated already, when the site hasn't been completed ?

Cache plugins should only be enabled when the site design has been finalised. We do not actually provide support to users who have cache plugins active, as they cause so many problems. Therefore, I recommend you disable the cache plugins, complete your sites design and then activate it again.

Also, cache plugins do not simply work out of the box, they need to be configured correctly and to how your server is configured. By configuring them incorrectly, you can actually cause all kinds of issues on your site.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny Well it's good to see that it's working for an external user; I'm not sure what exactly is the problem on my end... we're using the cache plugin because we're having some real speed issues with the site (we're on a shared server that doesn't support GZip), but I can understand why it might be just that that is causing the problem here, so I take your point on that.

I purged the page in question from the cache as that's what it said to do in the post guidelines. 

 

I've disabled the cache plugin for now. I'm still getting the issue on FF 29 for windows, I don't know what version you're using but I see you're on Mac... not sure if FF version is the issue.

 

Anyway, I understand if you can't help me further because you can't see the problem from where you are.

 

Regardless, I appreciate your help and advice Danny. Thanks. 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi there, i'm on a mac too, just checked in version 28.0 and its looking fine - http://screencast.com/t/T0dc8plq7e

Do you have any browser extensions installed in firefox? If so try disabling these to see if they're conflicting.

 

Edit: Just updated to FF 29 on mac and can confirm also displays correctly in there.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I've no extensions. My colleague, who is also running FF 29 on Windows, has the problem too.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

seatangltd Here is the curious thing. I only once, briefly saw you problem, but dont now. Firefox extensions and plugins can have an effect though. In my FF browser, I do not get that wonderful clip, but I do in a private window (where my extensions/plugins are disabled) 

 

It is a beautifully crafted site, but something is going wrong re Firefox somewhere. Another member pm'ed me today with a windows phone 8 bug, so even when things are right, then can go wrong.... grrrrr

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

GetMeWebDesign Thanks for the nice comments on the site. DMS2 is a very good tool. I tried disabling everything in FF but no luck. Are you on a Mac as well? It appears to be the only difference.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

seatangltd I need to read more carefully... PC not mac. I think macs are great and defo best for development/design, Just a bit old fashioned in that I like to muck about with code and find that pc offers me most of what I want

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for informing us you have resolved your issue, but that is really just masking the problem. Can you try adding a new MediaBox and then add your video embed code and see if the issue still persists.

As I am not having this issue whatsoever, on a Mac.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now