You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > XvVoiceBalance
XvVoiceBalance style property
Sets or retrieves the balance between left and right channels.
Same as the voice-balance property in the CSS3 declaration.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -xv-voice-balance |
Possible values:
The type of this property is string.
One of the following values:
Number between -100 and 100. | |||||||
Same as '0'. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Same as '-100'. | |||||||
Moves the sound to the left. | |||||||
Same as '100' or '+100'. | |||||||
Moves the sound to the right. |
Default: center.
Example HTML code 1:
This example illustrates the use of the -xv-voice-balance property:
|
||||
<head> <style> .left { -xv-voice-balance: leftwards; } .right { -xv-voice-balance: right; } </style> </head> <body> <p class="left">Moves the sound to the left.</p> <p class="right">Moves the sound to the right.</p> Select the text above, right click and select speak </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the XvVoiceBalance property in JavaScript:
|
||||
<head> <style> #example { -xv-voice-balance: left; } </style> <script type="text/javascript"> function ChangeBalance (selectTag) { var example = document.getElementById ("example"); // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the text of the selected option var selectState = selectTag.options[whichSelected].text; if ('XvVoiceBalance' in example.style) { example.style.XvVoiceBalance = selectState; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <p id="example">Listen the left and right speaker</p> Select the text above, right click and select speak, or change balance: <select onchange="ChangeBalance (this);" size="5"> <option selected="selected">left</option> <option>center</option> <option>right</option> <option>leftwards</option> <option>rightwards</option> </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.currentStyle, htmlElement.style
HTML elements:
a, abbr, acronym, address, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, input:button, input:file, input:password, input:reset, input:submit, input:text, ins, isindex, kbd, label, legend, li, marquee, menu, ol, optgroup, option, p, plaintext, pre, q, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
XvInterpretAs
opPhonemes
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
opPhonemes
XvVoiceDuration
opVoicePitch
opVoicePitchRange
opVoiceRate
opVoiceStress
opVoiceVolume
cue
cueAfter
cueBefore
pause
pauseAfter
pauseBefore
rest
restAfter
restBefore
speak
voiceFamily
External links:
User Contributed Comments