Click to See Complete Forum and Search --> : using sound


pti4ka
12-03-2004, 08:39 AM
is it possible to play sound when user does some action?
can i ,for example, control volume? start playback? stop playback?

soccer362001
12-03-2004, 09:50 AM
I don't think it can be done with HTML but you may look into Macromedia Flash.

pti4ka
12-03-2004, 10:40 AM
ok i see
thanks

TheBearMay
12-03-2004, 11:22 AM
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" type="application/x-oleobject" id="qtPlayer" width="180" height="35">
<param name="src" value="sounds/Startup.wav" id="fileName" />
<embed width="180" height="15" src="sounds/Startup.wav" enablejavascript="true" autostart="true" id="qtPlayer2"></embed>
</object>


or


<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="290" height="40" type="application/x-oleobject" id="mPlayer" >
<param name="AutoRewind" value="1" />
<parma name="AutoStart" value="1" />
<param name="PlayCount" value="1" /> <!-- 0 is continuous when used with AutoStart/AutoRewind -->
<param name="FileName" value="sounds/Startup.wav" />
<embed pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" src="sounds/Startup.wav" autostart="false" loop="false" width="290" height="40" id="mPlayer2" />
</object>


Will give you an embedded control that can be manipulated using Javascript.

pti4ka
12-03-2004, 12:36 PM
thanks:)
i'll check in depth
it is some kind of activex object so i guess it won't work in all browsers and in some it will be blocked?

by the way, where can i find info/reference on using embeded objetcs?
(in your example you use these parameters:
<param name="AutoRewind" value="1" />
<param name="AutoStart" value="1" />
<param name="PlayCount" value="1" /> <!-- 0 is continuous when used with AutoStart/AutoRewind -->
<param name="FileName" value)

TheBearMay
12-03-2004, 01:58 PM
The way it's setup, if the browser can't use the Object definition (Firefox for example), it will use the Embed definition. As far as the parameters the easiest way is to hop out to the respective web sites and do a search inside the site.

http://www.microsoft.com/mediaplayer
http://www.quicktime.com