blob: f5c548ee56f4f8ba48d6d806a22b6bc2eeb67690 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
var Audio =
{
plugin : null
};
Audio.init = function()
{
var success = true;
this.plugin = document.getElementById("pluginAudio");
if (!this.plugin) {
success = false;
}
return success;
};
Audio.setRelativeVolume = function(delta) {
if (Config.deviceType == 0)
this.plugin.SetVolumeWithKey(delta);
else
Main.log("Un-supported Audio Device");
Display.setVolume( this.getVolume() );
};
Audio.getVolume = function() {
var res = 0;
if (Config.deviceType == 0) {
res = this.plugin.GetVolume();
}
else {
Main.log("Un-supported Audio Device");
}
return res;
};
|