
This interface provides the methods for controlling background sound elements. These methods include the src, volume, balance, and loop properties for the sound element.
The BGSOUND tag enables you to create pages with background sounds or "sound tracks".
This element can be used only within the HEAD tag.
IHTMLBGsound Methods
| get_balance | get_loop | get_src |
| get_volume | put_balance | put_loop |
| put_src | put_volume |
HRESULT get_balance(
VARIANT *p
);
Retrieves the balance value of the background sound. The value specifies how the sound is divided between left and right speakers.
See also put_balance
HRESULT get_loop(
VARIANT *p
);
Retrieves the number of times the sound will loop when activated.
Following are descriptions on how the loop works for some boundary cases.
| <BGSOUND src="file:///c:\win95\system\msremind.wav"> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> | zero times |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> | infinitely |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> | once |
See also put_loop
HRESULT get_src(
BSTR *p
);
Retrieves the URL of the sound to be played.
See also put_src
HRESULT get_volume(
VARIANT *p
);
Retrieves the volume setting for the sound. The higher the setting, the louder the sound.
See also put_volume
HRESULT put_balance(
VARIANT v
);
Sets the balance value of the background sound. The value specifies how the sound is divided between left and right speakers.
See also get_balance
HRESULT put_loop(
VARIANT v
);
Sets the number of times the sound will loop when activated.
Following are descriptions on how loop works for some boundary cases.
| <BGSOUND src="file:///c:\win95\system\msremind.wav"> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP> | once |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=> | zero times |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=-1> | infinitely |
| <BGSOUND src="file:///c:\win95\system\msremind.wav" LOOP=0> | once |
See also get_loop
HRESULT put_src(
BSTR v
);
Sets the URL of a sound to be played.
See also get_src
HRESULT put_volume(
VARIANT v
);
Sets the volume setting for the sound. The higher the setting, the louder the sound.
See also get_volume
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.