Added a restriction to the in-game audio cue restricting play to only occur if the window is minimized and/or does not have focus.
This commit is contained in:
@@ -1956,7 +1956,10 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
PlaySound: function(soundObj) {
|
||||
var myAudio = document.getElementById(soundObj);
|
||||
myAudio.play();
|
||||
if(!document.hasFocus() || document.hidden || document.msHidden || document.webkitHidden)
|
||||
{
|
||||
myAudio.play();
|
||||
}
|
||||
},
|
||||
|
||||
createActionChoiceContextMenu: function (actions, event, selectActionFunction) {
|
||||
|
||||
Reference in New Issue
Block a user