You can set up a user interface control for sound volume.
Wait for the MediaPlayer instance to be in a valid status for this command.
Any state except for except RELEASED is valid.
Call the volume set method on the MediaPlayer
instance to set the audio volume.
public function set volume(value:Number):void
The value for the volume represents the requested volume expressed as a proportion of the maximum volume, where 0 is silent and 1 is the maximum volume.
If the specified volume is | The resulting volume is |
---|---|
Less than 0 | 0 |
Between 0 and 1 | The specified volume |
Greater than 1 | The value divided by 100 and set to one of the following values:
Tip: This logic handles values that are supplied from clients based on earlier versions of the phrases/primetime-sdk-name, where volume values ranged from 0 to 100. |