• We use iframe code to embed youtube video and it does not convert to <amp-youtube> automatically on AMP page.

    Is there any specific setting that is required to load AMP youtube JS and convert the iframe youtube embed to corresponding <amp-youtube> tage?

    or we should code for it explicitly using a hook?

    This is our current code for embedding youtube videos:
    <div class=”embed-responsive embed-responsive-16by9″>
    <iframe class=”embed-responsive-item” width=”560″ height=”315″ src=”VIDEO_CODE” frameborder=”0″ allowfullscreen></iframe>
    </div>

    • This topic was modified 6 years, 10 months ago by anil2122gupta. Reason: Added sample embed code

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you don’t have too many pages I would just use the custom AMP editor to embed the normal iframes that youtube provides. Then click the use custom amp code on that page. It is a practical solution which should be quick to do.

    Thread Starter anil2122gupta

    (@anil2122gupta)

    Thanks for the reply but it does not work in our case. We have video on almost page of our blog and it is part of a custom post type.

    Anyway, since there was no answer on the question, we modified the custom video code to write amp youtube tag ourselves quickly.

    Hi @anil2122gupta

    Sorry for the delay in response.

    Strange,
    Can you please contact me directly on [email protected]

    I will personally make sure that your issues get resolved immediately and please mentioned that you came from the forum.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Youtube embed does not convert to tag’ is closed to new replies.