0
シンプルなサウンドボードを作成しようとしていますが、現在のところ、IE9ではうまく動作しますが、Chromeでサウンドを再生するスクリプトによって生成されたと思われる奇妙なボックスがあります。私はそれらを取り除く方法を理解できません。クロームは、再生/一時停止やその他のボタンを表示しようとしているようHTMLサウンドボードには、ゴーストボックスがあります。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Soundboard</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="doc">
<h1>Soundboard</h1>
<!-- JS here to prevent 'flash' of all the default audio players -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("audio").removeAttr("controls").each(function(i, audioElement) {
var audio = $(this);
var that = this; //closure to keep reference to current audio tag
$("#doc").append($('<button>'+audio.attr("title")+'</button>').click(function() {
that.play();
}));
});
});
</script>
<audio src="audio/emintro.mp3" controls autobuffer="true" title="Murray!"></audio>
<audio src="audio/emitheme.mp3" controls autobuffer="true" title="Intro"></audio>
</div>
</body>
</html>
再び救助に、ありがとう。 – Nick