為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

having problems with streaming audio

  • 5 回覆
  • 68 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

Please Help, I'm Trying to add audio to my site. I've gotten it so that it works with Internet Explorer. It has to work so that there is music on the front page slide show and the galleries. It now works great on IE. However on both Firefox and Safari it works on the slide show but not the Gallery. My code is as follows...In The CSS Section (I think the problem might be here).

#my_music {display: none;}
.homepage #my_music {display: block;}

or

.gallery_XXXXXX #my_music {display: block;}

And I have this code placed in my footer:

<div id ="my_music"><OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="46">
<param name="fileName" value="http://www.homelesshh.com/pipmusic.m3u">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-300">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.homelesshh.com/pipmusic.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=-300>
</OBJECT>
</div>

Please Help me with this

Please Help, I'm Trying to add audio to my site. I've gotten it so that it works with Internet Explorer. It has to work so that there is music on the front page slide show and the galleries. It now works great on IE. However on both Firefox and Safari it works on the slide show but not the Gallery. My code is as follows...In The CSS Section (I think the problem might be here). <pre><code>#my_music {display: none;} .homepage #my_music {display: block;}</code></pre> or <pre><code>.gallery_XXXXXX #my_music {display: block;}</code></pre> And I have this code placed in my footer: <pre><code>&lt;div id ="my_music"&gt;&lt;OBJECT ID="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" STANDBY="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="280" height="46"&gt; &lt;param name="fileName" value="http://www.homelesshh.com/pipmusic.m3u"&gt; &lt;param name="animationatStart" value="true"&gt; &lt;param name="transparentatStart" value="true"&gt; &lt;param name="autoStart" value="true"&gt; &lt;param name="showControls" value="true"&gt; &lt;param name="Volume" value="-300"&gt; &lt;embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.homelesshh.com/pipmusic.m3u" name="MediaPlayer1" width=280 height=46 autostart=1 showcontrols=1 volume=-300&gt; &lt;/OBJECT&gt; &lt;/div&gt;</code></pre> Please Help me with this

由 cor-el 於 修改

被選擇的解決方法

I see that the server sends the CSS file with a different URL depending on the user agent

http://cdn.smugmug.com/include/css/gecko/2.18/win/user_pipp-201008241932163-nostretch.css
http://cdn.smugmug.com/include/css/gecko/4/linux/user_pipp-201008241932163-nostretch.css
http://cdn.smugmug.com/include/css/gecko/3/win/user_pipp-201008241932163-nostretch.css


The CSS file that I get still gives a display:none for that embed element. For which page is .gallery_XXXXXX meant ? What is the meaning of or ?

#my_music {display: none;}
.homepage #my_music {display: block;}
 
or
.gallery_XXXXXX #my_music {display: block;}


A simple #my_music {display: block;} in that CSS file should work, so you need to remove the other lines

從原來的回覆中察看解決方案 👍 0

所有回覆 (5)

more options

That is because you have #my_music {display: none;}

Firefox doesn't play media files if that content is hidden via display:none.

If you want to hide the player then use visibility:hidden
If you want visitors to be able to stop the music (I prefer that) then use {display: block;} there as well.

#my_music {visibility: hidden;} or #my_music {display: block;}
.homepage #my_music {display: block;}

由 cor-el 於 修改

more options

Thanks so much for the reply. I have made the changes as you suggested. However it still does not work on any of the galleries. The URL to the sight is: http://www.pipp.smugmug.com/

Any further help on this is greatly appreciated :)

-Q

more options

選擇的解決方法

I see that the server sends the CSS file with a different URL depending on the user agent

http://cdn.smugmug.com/include/css/gecko/2.18/win/user_pipp-201008241932163-nostretch.css
http://cdn.smugmug.com/include/css/gecko/4/linux/user_pipp-201008241932163-nostretch.css
http://cdn.smugmug.com/include/css/gecko/3/win/user_pipp-201008241932163-nostretch.css


The CSS file that I get still gives a display:none for that embed element. For which page is .gallery_XXXXXX meant ? What is the meaning of or ?

#my_music {display: none;}
.homepage #my_music {display: block;}
 
or
.gallery_XXXXXX #my_music {display: block;}


A simple #my_music {display: block;} in that CSS file should work, so you need to remove the other lines

由 cor-el 於 修改

more options

Thanks so much!! Got it working! appreciate the help. Mozilla Rocks.

Be blessed and take care.


-Q

more options

You're welcome.

I can confirm that it is working now.