search

Home  >  Q&A  >  body text

视频 - html5 video的autoplay 在智能手機上不運作?

巴扎黑巴扎黑2767 days ago760

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 14:35:41

    Thanks for the invitation, no.

    Due to browser security policies, such as prohibiting sudden sounds or traffic theft, autoplay is disabled on the mobile terminal. It must be played after the user manually clicks, touches and other events to be useful. JS simulated clicks will not work. .

    It seems that the latest ios10 can allow preloading. I wonder if autoplay will be allowed in the future.


    I tried it myself. It started to bring up the video pop-up window and play it after I slid the page. If you try it without moving it after loading, it will still come out.
    This is what I said about manually triggering it first. . .
    First there is a video tag, monitor the touchstart on the document, and then immediately call the play of the video

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:35:41

    Thank you for the invitation. Agree with the answer above.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 14:35:41

    Thanks for the invitation, I’m late. Tomato has made it very clear that forms are the most confusing. I'd rather rewrite it with another tag.

    reply
    0
  • Cancelreply