• Автоматическое воспроизведение видео с Youtube?

    syntaxsquake
    @syntaxsquake
    .py .dart .cpp
    <iframe width="560" height="315" src="https://www.youtube.com/embed/2f5yURQmppI?autoplay=1&loop=1&muted=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

    Необходимо было добавить muted.
    --
    You can let your video start playing automatically when a user visits the page, by adding autoplay=1 to the YouTube URL. However, automatically starting a video is annoying for your visitors!

    Note: Chromium browsers do not allow autoplay in most cases. However, muted autoplay is always allowed.

    Add mute=1 after autoplay=1 to let your video start playing automatically (but muted).
    Ответ написан
    Комментировать