How do I get my videos to play unmuted?

Solved

How do I get my videos to play unmuted?

mOONbOOTS
Explorer
62 6 8

Hello All,

 

How do I get my videos in the media gallery on my product page to play unmuted?

 

Any help would be greatly appreciated.

Accepted Solution (1)

mOONbOOTS
Explorer
62 6 8

This is an accepted solution.

Solved it myself.

 

Added " muted: false " to the product-thumbnail.liquid file:

{% comment %} added - muted: false {% endcomment %}
    <template>
      {%- liquid
        case media.media_type
          when 'external_video'
            assign video_class = 'js-' | append: media.host
            if media.host == 'youtube'
              echo media | external_video_url: autoplay: true, loop: loop, playlist: media.external_id | external_video_tag: class: video_class, loading: 'lazy'
            else
              echo media | external_video_url: autoplay: true, loop: loop | external_video_tag: class: video_class, loading: 'lazy'
            endif
          when 'video'
            echo media | media_tag: image_size: '2048x', autoplay: true, loop: loop, controls: true, preload: 'none', muted: false
          when 'model'
            echo media | media_tag: image_size: '2048x', toggleable: true
        endcase
      -%}
    </template>

 

View solution in original post

Reply 1 (1)

mOONbOOTS
Explorer
62 6 8

This is an accepted solution.

Solved it myself.

 

Added " muted: false " to the product-thumbnail.liquid file:

{% comment %} added - muted: false {% endcomment %}
    <template>
      {%- liquid
        case media.media_type
          when 'external_video'
            assign video_class = 'js-' | append: media.host
            if media.host == 'youtube'
              echo media | external_video_url: autoplay: true, loop: loop, playlist: media.external_id | external_video_tag: class: video_class, loading: 'lazy'
            else
              echo media | external_video_url: autoplay: true, loop: loop | external_video_tag: class: video_class, loading: 'lazy'
            endif
          when 'video'
            echo media | media_tag: image_size: '2048x', autoplay: true, loop: loop, controls: true, preload: 'none', muted: false
          when 'model'
            echo media | media_tag: image_size: '2048x', toggleable: true
        endcase
      -%}
    </template>