-
1. Re: Problem with mp3 Player in Safari
Nancy O. Jul 23, 2009 1:34 PM (in response to rlinsurf1)Start by giving your pages a valid document type. Without a doc type declaration on first line of html code, some browsers render in quirks mode with unpredictable results.
File menu > Convert > choose a document type that fits your coding skills: either XHTML strict/transitional or HTML strict/ transitional.
Then use these on-line code validation tools and fix any reported errors.
HTML Validator - http://validator.w3.org
CSS Validator - http://jigsaw.w3.org/css-validator/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
2. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 2:44 PM (in response to Nancy O.)Hi, Nancy--
I don't have any skill level. The page is actually finished at this point. From looking at the page, could you tell me which I should choose? Then I'll do the error checking and see what's happening with it.
Thanks.
J.
-
3. Re: Problem with mp3 Player in Safari
Nancy O. Jul 23, 2009 3:08 PM (in response to rlinsurf1)Use HTML 4.1 strict.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
4. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 4:27 PM (in response to Nancy O.)Hi, Nancy--
Ok, I set it to 4.0.1 strict and then ran it through validator.w3.org. Mostly what I see are errors that don't appear to actually be there. Example:
Line 13, Column 18: Attribute "LANGUAGE" is not a valid attribute. Did you mean "language"?
Here's the line:
<SCRIPT language="JavaScript" type="text/javascript">
jigsaw.w3.org said no errors were found.
I did correct what validator said were some missing alt="" which are required. Adding those has had no effect on the problem.
Here's the link to the report:
-
5. Re: Problem with mp3 Player in Safari
Nancy O. Jul 23, 2009 4:43 PM (in response to rlinsurf1)Deprecated code. Change ALL CAPS to lower case. VALIGN to valign, STYLE to style and so on.
Change this
<SCRIPT language="javascript".......
to this
<script type="text/javascript">
Our goal is to give all your site pages valid code so we can rule that out as possible cause of bad browser behavior.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
6. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 7:26 PM (in response to Nancy O.)Hi, Nancy--
Absolutely.
Ok, I did make that one change. The rest of the errors like that were all reporting lowercase elements, so I can't see what there is to change.
Could you check out the report? Maybe I'm just not understanding it.
-
7. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 7:37 PM (in response to rlinsurf1)BTW, I just checked. This is also not happening in IE on Windows. So it's just Safari.
-
8. Re: Problem with mp3 Player in Safari
Nancy O. Jul 23, 2009 8:37 PM (in response to rlinsurf1)OK There are still some validation errors that need fixing. When you fix 'em please upload the new page to server and we'll go from there. Safari is a major browser (aka web kit) which is used by DW and Chrome. So we need this page really clean.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fcharlesnewmanpubl.com%2Fcatalog.h tml
Nancy O.
-
9. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 8:57 PM (in response to Nancy O.)Can you tell me which ones? I fixed all the ones you mentioned, or that I understood. Most just look like they're reporting something that isn't there.
If you tell me which to fix, and maybe -- how(?), I'll for sure do it.
-
10. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 9:01 PM (in response to rlinsurf1)For example, the first error says:
No Character Encoding Found! Falling back to UTF-8.
But this is what's in my code:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
So I'm at a loss.
-
11. Re: Problem with mp3 Player in Safari
Nancy O. Jul 23, 2009 9:24 PM (in response to rlinsurf1)Please post your most recently updated page URL on which you have A) added a doc type, and B) fixed as many code errors as you could.
Thanks.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
12. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 23, 2009 9:54 PM (in response to Nancy O.)Hi, Nancy--
Here's the latest Validator page::
-
13. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 1:38 PM (in response to Nancy O.)Ok, Nancy. I'm clean. In both css and html.
I'm still having the issue in Safari. Please help.
-
14. Re: Problem with mp3 Player in Safari
DwFAQ Jul 25, 2009 1:59 PM (in response to rlinsurf1)Hello,
I am not able to reproduce the error you are experiencing in Safari. The file downloads and the time on the player remains the same.
-
-
16. Re: Problem with mp3 Player in Safari
DwFAQ Jul 25, 2009 2:47 PM (in response to rlinsurf1)Safari 4.0.2 OSX 10.5.7 no problems with timecode of song after download button clicked. If there is a problem with Safari 4.0.1 on 10.5.7 or Safari 4.0.2 on 10.4.11 it's a flash file = Flash problem = nothing to do with Dreamweaver.
-
17. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 3:05 PM (in response to DwFAQ)In that case, I'll have to do a browser check, and a workaround for the error.
What do you suggest?
-
18. Re: Problem with mp3 Player in Safari
DwFAQ Jul 25, 2009 3:20 PM (in response to rlinsurf1)You are using a flash player service. Contact the author of the player and ask for a fix. Another option is to find a different player that does what you want. If those options don't work for you then build one yourself.
-
19. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 3:34 PM (in response to DwFAQ)A browser check and workaround are all within DW. Sorry, I'm not about to get Google to "fix" their player.
Anyway, if you don't actually have something constructive to offer, you don't have to answer here. I can wait for someone who'd like to help me with my site and building it in DW.
-
20. Re: Problem with mp3 Player in Safari
DwFAQ Jul 25, 2009 3:42 PM (in response to rlinsurf1)Sure you can find a script that checks the browser and OS version and then use an if statement to display an alternate player. What server side language are you using? I only see .html extension on your pages so I assume you're not using a server side language.
-
21. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 3:47 PM (in response to DwFAQ)It's my website's server. I'm not sure, but I think they run Windows. It's pair.com.
I found a browser check, very long.
var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [ { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, { string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "Version" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.vendor, subString: "Camino", identity: "Camino" }, { // for newer Netscapes (6+) string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { // for older Netscapes (4-) string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" } ], dataOS : [ { string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.userAgent, subString: "iPhone", identity: "iPhone/iPod" }, { string: navigator.platform, subString: "Linux", identity: "Linux" } ] }; BrowserDetect.init();I'd like to shorten this just to look for the Specific Browser, Safari, and any version earlier than 4.0.2, and Mac OS, any earlier than 10.5.7, and with the onClick event, then give an alert to warn the user either not to Download until the track is finished playing, or upgrade their browser.
-
22. Re: Problem with mp3 Player in Safari
DwFAQ Jul 25, 2009 3:53 PM (in response to rlinsurf1)You would replace everything from dataBrowser to only show Safari.
dataBrowser: [ { string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "Version" }, ] }; BrowserDetect.init();
You still need a script that detects OS version
I'm curious... after you get the browser and OS detection setup what are you going to do then? use a different player? Why not just use a player that works cross-browser like I suggested earlier?
-
23. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 3:58 PM (in response to DwFAQ)This is supposed to check the OS version:
var agt = navigator.userAgent.toLowerCase()
So now I just need to access this info and give the alert if it matches Safari version<4.0.2 and OSX < 10.5.7.
This is my onClick event:
<area shape="rect" coords="171,460,271,469" href="#" alt="" onclick = "doButtons('http://charlesnewmanpubl.com/images/cd1/-47-33-PM.jpg','http://charlesnewmanpubl.com/audio/mp3s/cd1/Sweethearts_On_Parade_MW.mp3', 'http://charlesnewmanpubl.com/audio/ac3s/cd1/Sweethearts_On_Parade_MW.m4a')">
-
24. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 4:00 PM (in response to DwFAQ)If you have a suggestion for another player, that would be great.
-
25. Re: Problem with mp3 Player in Safari
Nancy O. Jul 25, 2009 4:01 PM (in response to rlinsurf1)In IE6 on Win XP the player skin doesn't show up but the download button appears to work. In Safari for Win, I cannot duplicate your problem. I noticed the file types are MPEG4 instead of MP3. I think you may have to find another player or embedding method for this project. This isn't working reliably in all Browsers.
http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-website s/2232/
http://www.premiumbeat.com/flash_resources/free_flash_music_player/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
26. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 4:07 PM (in response to Nancy O.)Hi, Nancy--
The downloads are .m4a's, but the player files are just .mp3's. I did that just so this player would work.
-
27. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 5:31 PM (in response to Nancy O.)Ok, I checked out the links above, and a couple are just out-of-date, specifically, the yahoo easy listener builder.
Anyway, I decided to take your (both) advice and try the flash-mp3-player. So here's the generated code:
<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_multi.swf" width="250" height="55"> <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_multi.swf" /> <param name="bgcolor" value="#710305" /> <param name="FlashVars" value="mp3=http%3A//flash-mp3-player.net/medias/another_world.mp3&width=250&height=55&showvolume=1" /> </object>
And here's my original code:
function doButtons(picimage, mp3file, dlURL) { var playerSrc = 'http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl='; var autoPlaySrc = '&autoPlay=true'; document['picture'].src=picimage; document.getElementById('mp3Holder').style.display = "inline-block"; document.getElementById('mp3Holder').data = playerSrc + mp3file + autoPlaySrc; }And the current object:
<object style="border: 0pt none ; float:left;margin-left:215px;display: none; width: 400px; height: 27px;" id="mp3Holder" data="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=http://charlesnewmanpubl.com/audio/mp3s/cd1/Sweethearts_On_Parade_LA1.mp3&autoPlay=true"></object>
Can you tell me how to adjust this so it will work with the new player object?
Thanks.
-
28. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 25, 2009 7:33 PM (in response to rlinsurf1)I can see that I need to have this filled with the var:
param name="FlashVars" value=
I just don't know how. I can do a
document.getElementById('mp3Holder').value = playerSrc + mp3file + autoPlaySrc;But how do I specify the value for that param?
-
29. Re: Problem with mp3 Player in Safari
rlinsurf1 Jul 26, 2009 12:15 AM (in response to rlinsurf1)Ok. I've gotten this far:
function doButtons(mp3file) { var flashPlaySrc = 'mp3='; var flashPlayParam = '&height=55&bgcolor1=9f0007&slidercolor2=440c0f&buttoncolor=440c0f'; document.getElementById('mp3Player').style.display = "inline-block"; document.getElementById('FlashVars').value = flashPlaySrc + mp3file + flashPlayParam; alert(flashPlaySrc + mp3file + flashPlayParam); }With this as the object:
<object name="mp3Player" id="mp3Player" type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_multi.swf" width="200" height="55"> <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_multi.swf" /> <param name="bgcolor" value="#710305" /> <param id="FlashVars" name="FlashVars" value="" /> </object>
When the alert comes up, it gives the correct string, and the flash-mp3-player thingie gets the very first file, and can play it. However, all the parameters for the colors, etc., aren't there, and it will only play the first .mp3, no others, and doesn't change. So something is wrong.






