Frederick Mfinanga
Frederick Mfinanga

Reputation: 1155

google amp carousel doest not autoplay using nextjs

I have 3 content inside the carousel but setting the property autoplay isn't working for all browsers. I'm wondering if there's something specific I have to do for next.js?

I have 3 content inside the carousel but setting the property autoplay isn't working for all browsers. I'm wondering if there's something specific I have to do for next.js?

<amp-carousel
            height="400"
            width="400"
            type="slides"
            autoplay="autoplay"
            delay="2000"
            loop="loop"
          >
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                Share what your customers are saying about your products, your
                company...
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                I've worked with Fred a few times, he's a creative and fun
                person to work with
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
            <div class="testimonials-card">
              <amp-fit-text
                width="300"
                height="250"
                layout="fixed"
                max-font-size="25"
              >
                Share what your customers are saying about your products, your
                company...
              </amp-fit-text>
              <amp-img
                src="frederick_mfinanga_avatar.jpg"
                width="80"
                height="80"
              ></amp-img>
            </div>
          </amp-carousel>

am using export const config = { amp: true }; to set up the amp page on nextjs

Upvotes: 1

Views: 437

Answers (1)

&#201;lyse
&#201;lyse

Reputation: 1361

<amp-carousel height="400" width="400" type="slides" controls="" loop="" autoplay="" delay="2000">...</amp-carousel>

Just tested and it's working without any amp errors

Upvotes: 1

Related Questions