• Resolved popeating

    (@popeating)


    On my site i have several pages that include galleries and youtube video embeds
    once they are ‘converted’ to amps, gallery and lightbox are correctly retained, but if the page contain also video the video is not embedded (no js, no tag and so on), video are correctly embedded only on pages without galleries.
    I have a long experience on programming wp but im getting frustrated because i really cant figure out how it happens… any help would be greatly appreciated

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • @popeating I am trying to replicate the same issue from my side although without success. Does the same issue arise using AMP in transitional when using a default WordPress theme?

    Thread Starter popeating

    (@popeating)

    i don’t know… i probably will try later, in the meantime i discovered the following:
    this page:
    https://www.popeating.it/ricette/le-ricette-degli-chef/bigne-la-ricetta-del-pasticcere-massimo-de-grazia/amp/
    is without gallery and it shows the video, but as an iframe!

    this other page
    https://www.popeating.it/magazine/il-lab-2019-di-mauro-uliassi-il-primo-lab-a-tre-stelle-michelin/amp/
    got galleries and shows the video as a text line

    in both pages (not amp version) the video markup is the following (made same way with block editor and youtube embed block)

    <figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio">
    <div class="wp-block-embed__wrapper">
    <span class="embed-youtube" style="text-align:center; display: block;"><iframe class="youtube-player" type="text/html" src="https://www.youtube.com/embed/JA_HMwPk8Cw?version=3&rel=1&fs=1&autohide=2&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent&enablejsapi=1" allowfullscreen="true" style="border: 0px; width: 847px; height: 476.404px;" id="widget2"></iframe></span>
    </div>
    </figure>

    im very confused
    at the moment i disabled the the AMP_YouTube_Embed_Handler and im trying to write a figure tag sanitizer to convert it to amp-youtube

    @popeating What happens when you use the “Custom HTML” block and then paste in the embed code provided from YouTube (Open any video > Share > Embed)?

    Thread Starter popeating

    (@popeating)

    Still getting the error, probably my site its a bit to complex to be handled by plugins in a standard way, it happened it before with other plugins.
    Since my posts got the embedded videos in <figure> way (and since all my contributors and the previously published content follow always a quiete rigid scheme) i solved disabling the youtube class and creating a figure sanitizer that convert it to a amp-youtube.
    i know this is not the best approach and not the best way to handle it, but the site is quiete big with thousands of page views daily and some contributors that follow our rules (i dont want to give them new rules once they learned them!) this was the most fast approach in short terms. anyway we are still working on a new template and new way to save posts so we can revert to standard plugins as soon as possible!
    thank you for your support!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Carousel/lightbox and youtube’ is closed to new replies.