This article introduces how HTML5 solves the problem that Apple phones cannot automatically play music. The solution is as follows:
Quote:
<script src=http://res.wx.qq.com/open/js/jweixin-1.0.0.js></script> <script> function autoPlayAudio() { wx.config({ // Configuration information, Use wx.ready even if incorrect debug: false, appId: '', timestamp: 1, nonceStr: '', signature: '', jsApiList: [] }); wx.ready(function() { var globalAudio=document.getElementById(bgMusic); globalAudio.play(); }); };//Solve the problem of ios music not playing automatically autoPlayAudio();</script> //Only Only for WeChat, not browserSummarize
The above is the HTML5 solution introduced by the editor to solve the problem of Apple mobile phones not automatically playing music. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for your support of the VeVb martial arts website!