Incrustar enlaces de YouTube

I was hoping I’d see another post on this, but previously it was easy to embed YouTube vids right into the text box and now they are showing up as hyperlinks.

Is there a fix?

3 Me gusta

This should still be working. Do make sure you have the link on it’s own line, as that’s a requirement for our onebox to function.

If you can share any examples of where this isn’t working, this might be able to help us track down further issues though!

4 Me gusta

Yes, I know about having the link on its own line. All the links I have are unlisted and they are out client’s so I feel weird using them… but it’s happening on everyone’s posts…

1 me gusta

Here’s what I’m seeing

1 me gusta

Does it work if you use a listed video? It’s possible something is broken with unlisted links. Google may have made a change blocking onebox from rendering those videos.

2 Me gusta

It doesn’t seem to be working on our site with either listed or unlisted. It IS working here if I post an unlisted video.

1 me gusta

Here’s an unlisted video for comparison:

It’s possible that YouTube may be blocking requests from the IP of your server?

If you run, for example:

puts Onebox.preview('https://youtu.be/E5oGcdqz5xk')

in your server’s rails console, do you get something like:

<div class="onebox lazyYT lazyYT-container" data-youtube-id="E5oGcdqz5xk" data-youtube-title="demo unlisted link" data-parameters="feature=oembed&amp;wmode=opaque">
  <a href="https://www.youtube.com/watch?v=E5oGcdqz5xk" target="_blank" rel="nofollow ugc noopener">
    ![](upload://hp5dMCYhQ42qK2Oru9gQ6Q9R0nY.jpeg "demo unlisted link")
  </a>
</div>
8 Me gusta

Yes, your server ip is blocked by YouTube. This has come up a number of times recently.

2 Me gusta