search

Home  >  Q&A  >  body text

javascript - H5 audio tag How to achieve continuous playback of music across pages (without restarting)

Mobile terminal development How to achieve continuous playback of music across pages (without restarting); the currentTime attribute is not easy to use. . . . . .

为情所困为情所困2859 days ago1649

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-16 13:31:47

    I haven’t explored whether it can cross pages, but our page can be simulated with p, so that the music can always play

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 13:31:47

    Two methods
    <html>
    <frameset cols="50%,50%">

    <frame src="/log/music.html">
    <frame src="/log/index.html">

    </frameset>
    </html>
    Hide the first page, play music, jump to the second page, or use history.pushState to load data across pages
    Reference http://stackoverflow.com/ques ...

    reply
    0
  • Cancelreply