homepage Welcome to WebmasterWorld Guest from 184.73.87.85
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript/jquery player works fine in Firefox, Chrome and Safari but.
..not IE or Opera.
digitaltoast




msg:4084916
 6:52 pm on Feb 22, 2010 (gmt 0)

Regarding the jquery-based jplayer project, I can play their demo fine in all browsers: [happyworm.com...]

But when I copy their code (which they're happy for me to do) for some reason, my own playlist works fine in Firefox, Chrome and Safari not IE or Opera. IE just hangs saying "Waiting for..." and Opera just loads the page and stops. I've spent the last 3 hours moving the order of things around in the header, moving the block of javascript around etc.

How it works is, user enters location, which is processed by php before the page loads, then variables are embedded in the javascript. I can see from the source that all of this is working. In fact, when I change it to a static file it still works fine.

I've read about sloppy commas and found one at the end of the playlist and removed it, but it still won't start - it doesn't show the playlist or anything, it just says
"1 item remaining".
Would anyone mind trying my little test site? SNIP
- don't worry too much about the look of the site right now, it's aimed at blind people.
I was previously doing it with a Flash player, but realised there would be concerns from the anti-Flash brigade, but it works fine there:
SNIP

I've googled myself silly - looks like there was a problem will old versions of the jquery library but it's using 1.4 and I also tried 1.4.2

Any help would be hugely appreciated.

By the way, does anyone know how I could easily center the player?

[edited by: Fotiman at 1:56 pm (utc) on Feb 23, 2010]
[edit reason] No URLs please. See TOS [webmasterworld.com] [/edit]

 

Readie




msg:4084924
 7:02 pm on Feb 22, 2010 (gmt 0)

I don't have any knowledge to share with regards to your loading issues for cross compatability, I can however tell you how to center it.

css:
div.cent {
width: 100%;
text-align: center;
}

actual page:
<div class="cent"><div>{YOUR PLAYER CODE HERE}</div></div>

Is one way of doing it. Whether that is semantically correct is another matter: but it works.

digitaltoast




msg:4085144
 11:24 pm on Feb 22, 2010 (gmt 0)

Readie - thanks for that tip. As for my other problem, the author of the app actually got back in touch with me! I can't believe I hadn't noticed this! He said...

You have not uploaded the Jplayer.swf file. Since you have not set a
swfPath, jPlayer uses the default relative path of "js". This means it
is expecting the flash to be at the url:
SNIP

You can change the Path to meet your needs, as long as it is on your
domain. ie., you can use absolute url or relative to your sever root.
Eg. {swfPath:"/jPlayerPlugin"}.

Note that jPlayer uses a piece of Flash as a fall back. The 2 browsers
you named, IE and Opera do not support HTML5 audio. This is why they
fail since the SWF flash file cannot be found. Think of the Flash as a
patch to non HTML5 browsers.

[edited by: Fotiman at 1:57 pm (utc) on Feb 23, 2010]
[edit reason] No URLs please. See TOS [webmasterworld.com] [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved