Accelerated-mobile-pages: Youtube embeded isn't working because of missing script tag

Created on 3 Jan 2017  路  10Comments  路  Source: ahmedkaludi/accelerated-mobile-pages

Hi,
I have a issue with my embeded youtube video:
AMP version: no video showed
image
Code inspector: see the amp-youtube tag is present but I miss the amp-youtube script tag in the head:
image

What should have been in the script tag:

Link to site: http://www.zuunsekarpers.be/amp/

Kind regards
Love the project BTW!!

Most helpful comment

Tell you what @jeremycoppey, I will make sure that this is done in the next few updates.

THANKS!

All 10 comments

Videos work fine in my install, it might actually be a problem with CSS, I can remember having that problem myself and having to add in some CSS.

I think that I floated and added a width to ".the_content p", try doing that.

@jeremycoppey Can you please let us know if you are still having this issue?

The issue still persist, just tested it on my mobile and on my desktop after I ran the updates on my site.
you can check for yourself on : http://www.zuunsekarpers.be/amp/

@jeremycoppey How are you adding the Youtube video? Through a shortcode? IF So, then can you please paste that code? it would help us in fixing this issue.

Its added like this right under the text:
[embed]https://www.youtube.com/watch?v=70w_CqOz8fg[/embed]

In the non amp version it works perfectly

Tell you what @jeremycoppey, I will make sure that this is done in the next few updates.

THANKS!

Hey @jeremycoppey

editor
image

output
image

If you still get this error please use the following code instead

<iframe width="584" height="438" src="https://www.youtube.com/embed/70w_CqOz8fg" frameborder="0" allowfullscreen></iframe>

@khaledMohammed000 Thanks I didn't work so I used your code!
thanks for the assist!

@jeremycoppey You can just post YouTube URL links into posts within the visual editor and Wordpress will automatically convert that into an embed for you, that works for me and it's a lot simpler.

For example, just paste this into the visual editor:

https://www.youtube.com/watch?v=70w_CqOz8fg

And Wordpress will automatically make it a YouTube embed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carloosamarante picture carloosamarante  路  6Comments

luan03 picture luan03  路  3Comments

shchedrakov picture shchedrakov  路  3Comments

satriaenur picture satriaenur  路  4Comments

jeherve picture jeherve  路  8Comments