首页 > 解决方案 > 在扰流板标签内与 Audioplayer 接口

问题描述

我设置了以下(意大利面条)代码:

  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body style="margin: 0 auto;">
    <div class="pre-spoiler">
      <input name="Deutsch" onclick="if (this.parentNode.getElementsByTagName('div')[0].style.display != 'none') { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Musicplayer'; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'block'; this.value = 'Musicplayer';}"

value="Musicplayer" type="button">
      <div class="spoiler" style="display: none;">
        <style>
            h1 {
                color:Green;
            }
            div.scroll {
                margin:4px, 4px;
                padding:4px;
                background-color: white;
                width: 500px;
                height: 110px;
                overflow-x: hidden;
                overflow-y: auto;
                text-align:justify;
            }
        </style>
        <div class="scroll">
          <style>
        #playlist{
            list-style: none;
        }
        #playlist li a{
            color:black;
            text-decoration: none;
        }
        #playlist .current-song a{
            color:blue;
        }
    </style> <audio src="" controls="controls" id="audioPlayer"> Sorry, your
            browser doesn't support html5! </audio>
          <ul id="playlist">
            <li class="current-song"><a href="Track01.mp3">Guitar</a></li>
            <li class="current-song"><a href="Track02.mp3">Guitar02</a></li>

          </ul>
          <script src="https://code.jquery.com/jquery-2.2.0.js"></script>
          <script src="audioPlayer.js"></script>
          <script>
        // loads the audio player
        audioPlayer();
    </script> </div>
      </div>
      <a href="#" onclick="playlist.prevTrack();">«</a>
      <a href="#" onclick="playlist.nextTrack();">»</a>
      <a href="https://github.com/NelsWebDev/BetterAudioPlaylist" style="color: #666666;">src</a>
      <iframe src="https.//www.testsitefortesting.com" style="overflow:hidden; 
         display:block; position: absolute; height: 100%; width: 100%" frameborder="0">
        &lt;p style=""&gt; Your browser does not support iframes.
        &lt;/p&gt;
        &lt;/body&gt;
      </iframe></div>
  </body>
</html>

然而,似乎 - 可以预见 - 两个控制元素(trackskip)无法与剧透标签内的音频播放器交互

有没有办法让它与它交互?(我当然可以把它放到剧透中,但是每次与播放器交互时我都必须打开/关闭它)

标签: htmlaudiointerfacetracking

解决方案


推荐阅读