Volume Module

RhoElements 2.x API

Overview

The Volume Module controls the audio output volume of wave files being played on the device. This does not set the volume of the device beeper.

Syntax

volume (Module) <META> Syntax

<META HTTP-Equiv="Volume" content="[parameter]">

Volume JavaScript Object Syntax:
By default the JavaScript Object 'volume' will exist on the current page and can be used to interact directly with the volume.
To Set volume parameters via JavaScript use the following syntax: volume.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. volume.setVolume = 'value';

To set multiple EMML parameters / events on a single line use the following syntax: volume.setEMML("[Your EMML Tags]");

e.g. volume.setEMML("setVolume:value");

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

NamePossible ValuesDescriptionDefault Value
setVolume:[Value] Volume in the format 0xnnnn Specifies a new volume setting. The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting. A value of 0xFFFF represents full volume, and a value of 0x0000 is silence. If a device does not support both left and right volume control, the low-order word specifies the volume level and the high-order word is ignored Device Dependant

Multi Instance

When multiple RhoElememts applications are running the following considerations should be made: The volume settings are application specific. Switching to another application which uses the volume module will cause the device volume to change to that specified by the application with focus. Only the application with Focus will have the ability to change the volume settings.

Requirements

RhoElements Version 1.0.0 or above
Supported DevicesAll supported devices.
Minimum RequirementsThe device must have a speaker.
PersistencePersistent - Changes to this module will persist when navigating to a new page.

HTML/JavaScript Examples

The following example sets the device volume to its maximum for all devices

    
    <meta http-equiv="Volume" content="SetVolume:0xFFFF">

The following example sets the device volume to its maximum for devices with a single wave output channel.

    
    <meta http-equiv="Volume" content="SetVolume:0x00FF">