html5 mobile terminal does not play a sound card method

html5 mobile terminal does not play a sound card way
line download http://wxserver.knowway.cn/solosea/js/audioEngine.js this is a good performance

You can then play the sound directly
audioEngine.playEffect ( '/ solosea1 / music / laidian.mp3', false);

If not then handover may first stop Play
audioEngine.stopEffect ( '/ hcfabuhui / Music / 2.mp3');

If the delay is affecting the performance of the pre-load other code is useless


There is a better way with the music inside the frame creatjs

<pre>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
html,body{
width:750px;
height:750px;
background: #000;
}
</style>
</head>
<body>
<script type="text/javascript" src="/liuanchewei/js/createjs.js"></script>
<script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.js"></script>

<Script>
$ (function () {
createjs.Sound.registerSound ({the src: "/ liuanchewei / Audio / type.mp3", ID: "TAP"});
})
$ ( 'body') ON ( 'the Click. ', function () {
createjs.Sound.play ( "TAP");
})
</ Script>
</ body>
</ HTML>
</ pre>
PS: just entering the page register so as to be a little while then It will not be delayed

Guess you like

Origin www.cnblogs.com/newmiracle/p/11875313.html