HTML video not playing in Safari browser

后端 未结 5 480
情话喂你
情话喂你 2021-01-20 13:07

Below code is working fine in Mozilla & Chrome. But in Safari the video doesn\'t play.

5条回答
  •  难免孤独
    2021-01-20 13:18

    Safari has started (in the last year) preventing videos with audio tracks from auto-playing by default. They never specifically publicised this as far as I'm aware, however I believe it was part of the following changes:

    Safari 11 also gives users control over which websites are allowed to auto-play video and audio by opening Safari’s new “Websites” preferences pane

    (Source)

    The only real workarounds for this are to either remove the audio track from the video, or have it muted by default.

    If your server can detect the requester's browser, you can apply this to just Safari, leaving other browsers as they were before.

提交回复
热议问题