<audio src="{$uploadpath}{$FileUpload}" autoplay loop ></audio>

              <script type="text/javascript">
                document.addEventListener('DOMContentLoaded', function () {
                    function audioAutoPlay() {
                        var audio = document.getElementById('audiojs');
                            audio.play();
                        document.addEventListener("WeixinJSBridgeReady", function () {
                            audio.play();
                        }, false);
                    }
                    audioAutoPlay();
                });

                  if (/i(Phone|P(o|a)d)/.test(navigator.userAgent)) {
                    $(document).one('touchstart',
                      function(e) {
                          $('#audiojs').get(0).touchstart = true;
                          $('#audiojs').get(0).play();
                          return false;
                      });
                  }
              </script>

  

 

相关文章:

  • 2021-12-12
  • 2020-06-03
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案