jQuery Media Problem

View: New views
10 Messages — Rating Filter:   Alert me  

jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a D6 site with jQuery Media and jQuery Plugin and it's set to
replace links to MP3 files with the Flash player. This worked once,
but since then the site has been updated and now it fails and I can't
figure out why. I see in Firebug what appears to be the correct code:

<embed height="40" width="300"
flashvars="file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
autoplay="false" wmode="transparent" bgcolor="#ffffff"
pluginspage="http://www.adobe.com/go/getflashplayer"
type="application/x-shockwave-flash"
src="/player.swf?file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
style="display: block;"/>

but nothing appears. Right click says "movie not loaded" but if I go
to http://MYSITE.com/player.swf then I see the player normally.

Any ideas?
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anybody have a suggestion? Ideas how to debug?

Thanks. I am a bit stuck... :(

On Sun, Jun 28, 2009 at 1:53 PM, Fred Jones<fredthejonester@...> wrote:

> I have a D6 site with jQuery Media and jQuery Plugin and it's set to
> replace links to MP3 files with the Flash player. This worked once,
> but since then the site has been updated and now it fails and I can't
> figure out why. I see in Firebug what appears to be the correct code:
>
> <embed height="40" width="300"
> flashvars="file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
> autoplay="false" wmode="transparent" bgcolor="#ffffff"
> pluginspage="http://www.adobe.com/go/getflashplayer"
> type="application/x-shockwave-flash"
> src="/player.swf?file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
> style="display: block;"/>
>
> but nothing appears. Right click says "movie not loaded" but if I go
> to http://MYSITE.com/player.swf then I see the player normally.
>
> Any ideas?
>
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by Jacob Roufa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you tried using a relative URL instead of absolute (i.e. get rid of http:// and go from current path "../sites/default/files/mp3s/*.mp3") when referring to the mp3 file? How does your link read out?

Jake Roufa
Web Consultant
http://jacobroufa.com


On Wed, Jul 1, 2009 at 6:02 AM, Fred Jones <fredthejonester@...> wrote:
Anybody have a suggestion? Ideas how to debug?

Thanks. I am a bit stuck... :(

On Sun, Jun 28, 2009 at 1:53 PM, Fred Jones<fredthejonester@...> wrote:
> I have a D6 site with jQuery Media and jQuery Plugin and it's set to
> replace links to MP3 files with the Flash player. This worked once,
> but since then the site has been updated and now it fails and I can't
> figure out why. I see in Firebug what appears to be the correct code:
>
> <embed height="40" width="300"
> flashvars="file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
> autoplay="false" wmode="transparent" bgcolor="#ffffff"
> pluginspage="http://www.adobe.com/go/getflashplayer"
> type="application/x-shockwave-flash"
> src="/player.swf?file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
> style="display: block;"/>
>
> but nothing appears. Right click says "movie not loaded" but if I go
> to http://MYSITE.com/player.swf then I see the player normally.
>
> Any ideas?
>
--
[ Drupal support list | http://lists.drupal.org/ ]


--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by Jamie Holly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If that works, make sure you check it in different browsers. Some
(mainly IE) have oddball results when dealing with Flash security policies.

First thing I would check is if you right click over where the player
should be, do you see "Flash Player" in the right click menu? If so then
the embed code is fine. I haven't used this module, but there is a
chance that something in the player's security isn't letting it kick in.
A good rule of thumb with anything Flash is to always use absolute
domains and make sure you have a crossdomain.xml file properly set up.
One way to check if that is causing the problem is to install the debug
version of Flash Player:

http://www.adobe.com/support/flashplayer/downloads.html

If its a security policy problem then you should get a sandbox violation
error. If its anything else in the player then you will also get an
error popup that might indicate whats happening.


Jamie Holly
http://www.intoxination.net 
http://www.hollyit.net



Jacob Roufa wrote:

> Have you tried using a relative URL instead of absolute (i.e. get rid
> of http:// and go from current path
> "../sites/default/files/mp3s/*.mp3") when referring to the mp3 file?
> How does your link read out?
>
> Jake Roufa
> Web Consultant
> http://jacobroufa.com
>
>
> On Wed, Jul 1, 2009 at 6:02 AM, Fred Jones <fredthejonester@...
> <mailto:fredthejonester@...>> wrote:
>
>     Anybody have a suggestion? Ideas how to debug?
>
>     Thanks. I am a bit stuck... :(
>
>     On Sun, Jun 28, 2009 at 1:53 PM, Fred
>     Jones<fredthejonester@...
>     <mailto:fredthejonester@...>> wrote:
>     > I have a D6 site with jQuery Media and jQuery Plugin and it's set to
>     > replace links to MP3 files with the Flash player. This worked once,
>     > but since then the site has been updated and now it fails and I
>     can't
>     > figure out why. I see in Firebug what appears to be the correct
>     code:
>     >
>     > <embed height="40" width="300"
>     >
>     flashvars="file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
>     > autoplay="false" wmode="transparent" bgcolor="#ffffff"
>     > pluginspage="http://www.adobe.com/go/getflashplayer"
>     > type="application/x-shockwave-flash"
>     >
>     src="/player.swf?file=http://MYSITE.com/sites/default/files/mp3s/SomeFile.mp3"
>     > style="display: block;"/>
>     >
>     > but nothing appears. Right click says "movie not loaded" but if I go
>     > to http://MYSITE.com/player.swf then I see the player normally.
>     >
>     > Any ideas?
>     >
>     --
>     [ Drupal support list | http://lists.drupal.org/ ]
>
>
> ------------------------------------------------------------------------
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 1, 2009 at 4:56 PM, Jacob Roufa<jacob.roufa@...> wrote:
> Have you tried using a relative URL instead of absolute (i.e. get rid of
> http:// and go from current path "../sites/default/files/mp3s/*.mp3") when
> referring to the mp3 file? How does your link read out?

The admin/content/node-type/audio/display/basic page gives these options:

Generic File
Path to File
URL to File
<hidden>

I am using the first. The second or third just print text, not a link
and then nothing happens. How can I tell it to use a relative URL? I
am using FileField module.

> First thing I would check is if you right click over where the player should
> be, do you see "Flash Player" in the right click menu? If so then the embed
> code is fine. I haven't used this module, but there is a chance that
> something in the player's security isn't letting it kick in. A good rule of
> thumb with anything Flash is to always use absolute domains and make sure
> you have a crossdomain.xml file properly set up. One way to check if that is
> causing the problem is to install the debug version of Flash Player:
>
> http://www.adobe.com/support/flashplayer/downloads.html
>
> If its a security policy problem then you should get a sandbox violation
> error. If its anything else in the player then you will also get an error
> popup that might indicate whats happening.

Right click shows Flash, but "movie not loaded" The code isn't
cross-domain. It's like this:

<embed height="40" width="300"
flashvars="file=http://www.xxx.com/sites/default/files/mp3s/LoveAndRelationship1_0.mp3"
autoplay="false" wmode="transparent" bgcolor="#ffffff"
pluginspage="http://www.adobe.com/go/getflashplayer"
type="application/x-shockwave-flash"
src="/player.swf?file=http://www.xxx.com/sites/default/files/mp3s/LoveAndRelationship1_0.mp3"
style="display: block;"/>

That's the jQuery-generated code. Here's a page:

http://tinyurl.com/mz5ut6
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by Jamie Holly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The relative URL passing to the player does fix it. Try clicking here,
which is the code coming through on your site:

http://www.intorah.com/player.swf?file=http://www.intorah.com/sites/default/files/mp3s/LoveAndRelationship1_0.mp3

And you get a 404, but change it to this:

http://www.intorah.com/player.swf?file=/sites/default/files/mp3s/LoveAndRelationship1_0.mp3 


And it works. I'm not sure how to set the modules to use relative
instead of absolute URLs (never used them before). Hopefully someone
else has an idea.

Jamie Holly
http://www.intoxination.net 
http://www.hollyit.net



Fred Jones wrote:

> On Wed, Jul 1, 2009 at 4:56 PM, Jacob Roufa<jacob.roufa@...> wrote:
> > Have you tried using a relative URL instead of absolute (i.e. get rid of
> > http:// and go from current path "../sites/default/files/mp3s/*.mp3") when
> > referring to the mp3 file? How does your link read out?
>
> The admin/content/node-type/audio/display/basic page gives these options:
>
> Generic File
> Path to File
> URL to File
> <hidden>
>
> I am using the first. The second or third just print text, not a link
> and then nothing happens. How can I tell it to use a relative URL? I
> am using FileField module.
>
> > First thing I would check is if you right click over where the player should
> > be, do you see "Flash Player" in the right click menu? If so then the embed
> > code is fine. I haven't used this module, but there is a chance that
> > something in the player's security isn't letting it kick in. A good rule of
> > thumb with anything Flash is to always use absolute domains and make sure
> > you have a crossdomain.xml file properly set up. One way to check if that is
> > causing the problem is to install the debug version of Flash Player:
> >
> > http://www.adobe.com/support/flashplayer/downloads.html
> >
> > If its a security policy problem then you should get a sandbox violation
> > error. If its anything else in the player then you will also get an error
> > popup that might indicate whats happening.
>
> Right click shows Flash, but "movie not loaded" The code isn't
> cross-domain. It's like this:
>
> <embed height="40" width="300"
> flashvars="file=http://www.xxx.com/sites/default/files/mp3s/LoveAndRelationship1_0.mp3"
> autoplay="false" wmode="transparent" bgcolor="#ffffff"
> pluginspage="http://www.adobe.com/go/getflashplayer"
> type="application/x-shockwave-flash"
> src="/player.swf?file=http://www.xxx.com/sites/default/files/mp3s/LoveAndRelationship1_0.mp3"
> style="display: block;"/>
>
> That's the jQuery-generated code. Here's a page:
>
> http://tinyurl.com/mz5ut6
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>  
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The relative URL passing to the player does fix it. Try clicking here, which
> is the code coming through on your site:

...

> And it works. I'm not sure how to set the modules to use relative instead of
> absolute URLs (never used them before). Hopefully someone else has an idea.

Well now, one little stroke of genius later and you've got it!

At least now I know what the problem is and I can try fix it. Thank
you very much.

F
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> At least now I know what the problem is and I can try fix it. Thank
> you very much.

Don't know how to fix it the "right" way but adding this:

  $content = str_replace('http://www.MYSITE.com','',$content);

in node.tpl.php worked. :)

Thanks.
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by Jamie Holly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LOL that's one of my favorite tricks when I don't feel like figuring
something else out. Glad we got it.

Jamie Holly
http://www.intoxination.net 
http://www.hollyit.net



Fred Jones wrote:

> > At least now I know what the problem is and I can try fix it. Thank
> > you very much.
>
> Don't know how to fix it the "right" way but adding this:
>
>   $content = str_replace('http://www.MYSITE.com','',$content);
>
> in node.tpl.php worked. :)
>
> Thanks.
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>  
--
[ Drupal support list | http://lists.drupal.org/ ]

Re: jQuery Media Problem

by FredJones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> LOL that's one of my favorite tricks when I don't feel like figuring
> something else out. Glad we got it.

Rock and roll. :)

Drupal hackers unite! ;)
--
[ Drupal support list | http://lists.drupal.org/ ]