mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-19 18:36:25 +00:00
Custom default volume
This commit is contained in:
parent
daaf010b94
commit
dcd01210a1
3 changed files with 4 additions and 2 deletions
|
@ -13,5 +13,6 @@
|
|||
mute: false,
|
||||
volume: true,
|
||||
}*/
|
||||
EJS_volume = 1;
|
||||
</script>
|
||||
<script src='src/loader.js'></script>
|
||||
|
|
|
@ -148,17 +148,17 @@ class EmulatorJS {
|
|||
}
|
||||
}
|
||||
constructor(element, config) {
|
||||
this.config = config;
|
||||
window.EJS_TESTING = this;
|
||||
this.currentPopup = null;
|
||||
this.touch = false;
|
||||
this.debug = (window.EJS_DEBUG_XX === true);
|
||||
this.cheats = [];
|
||||
this.started = false;
|
||||
this.volume = 0.5;
|
||||
this.volume = (typeof this.config.volume === "number") ? this.config.volume : 0.5;
|
||||
this.muted = false;
|
||||
this.paused = true;
|
||||
this.listeners = [];
|
||||
this.config = config;
|
||||
this.setElements(element);
|
||||
this.setColor(this.config.color || "");
|
||||
if (this.config.adUrl) this.setupAds(this.config.adUrl);
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
config.adTimer = window.EJS_AdTimer
|
||||
config.VirtualGamepadSettings = window.EJS_VirtualGamepadSettings;
|
||||
config.buttonOpts = window.EJS_Buttons;
|
||||
config.volume = window.EJS_volume;
|
||||
|
||||
new EmulatorJS(EJS_player, config);
|
||||
|
||||
|
|
Loading…
Reference in a new issue