Fixed game ready fanfare audio
Converted fanfare audio file to mp3 (the specific WAV encoding appears to be a form that has been deprecated in support by various browsers). Converted audio to use the HTML5 <audio> tag, which has support from every major browser. Updated gitignore to ignore replay folders.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -17,4 +17,5 @@ logs/*
|
||||
**/logs
|
||||
.idea/
|
||||
*.iml
|
||||
remote-sync
|
||||
remote-sync
|
||||
replay
|
||||
BIN
gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3
Normal file
BIN
gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3
Normal file
Binary file not shown.
@@ -42,6 +42,8 @@
|
||||
<script type="text/javascript" src="js/gemp-022/gameAnimations.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/merchantUi.js"></script>
|
||||
|
||||
<audio id="gamestart" src="/gemp-lotr/fanfare_x.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
|
||||
<script type="text/javascript">
|
||||
var chat;
|
||||
var hall;
|
||||
@@ -144,6 +146,8 @@
|
||||
chat.setBounds(2, 2, innerWidth - 4, middleHeight - 4);
|
||||
hall.hallResized(innerWidth, middleHeight);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -397,6 +397,11 @@ var GempLotrHallUI = Class.extend({
|
||||
.css({borderTopColor:"#000000", borderLeftColor:"#000000", borderBottomColor:"#000000", borderRightColor:"#000000"})
|
||||
.animate({borderTopColor:"#ffffff", borderLeftColor:"#ffffff", borderBottomColor:"#ffffff", borderRightColor:"#ffffff"}, "fast");
|
||||
},
|
||||
|
||||
PlaySound: function(soundObj) {
|
||||
var myAudio = document.getElementById(soundObj);
|
||||
myAudio.play();
|
||||
},
|
||||
|
||||
processHall:function (xml) {
|
||||
var that = this;
|
||||
@@ -678,12 +683,14 @@ var GempLotrHallUI = Class.extend({
|
||||
window.open("/gemp-lotr/game.html?gameId=" + waitingGameId + participantIdAppend, "_blank");
|
||||
}
|
||||
if (games.length > 0) {
|
||||
var soundPlay = $("<embed src='/gemp-lotr/fanfare_x.wav' hidden='true' autostart='true' loop='false'>");
|
||||
this.tablesDiv.append(soundPlay);
|
||||
setTimeout(
|
||||
function() {
|
||||
soundPlay.remove();
|
||||
}, 5000);
|
||||
// var soundPlay = $("<embed src='/gemp-lotr/fanfare_x.mp3' hidden='true' autostart='true' loop='false'>");
|
||||
// this.tablesDiv.append(soundPlay);
|
||||
// setTimeout(
|
||||
// function() {
|
||||
// soundPlay.remove();
|
||||
// }, 5000);
|
||||
|
||||
this.PlaySound("gamestart");
|
||||
}
|
||||
|
||||
if (!this.supportedFormatsInitialized) {
|
||||
|
||||
Reference in New Issue
Block a user