google-code-backups / lifepress

Automatically exported from code.google.com/p/lifepress
Other
0 stars 0 forks source link

Youtube embedded videos not working #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Last week (likely to do with all the small changes their making to the
youtube player) all my embedded youtube videos stopped working. I
looked into and wanted to share this in case anyone else ran into this
problem.

Youtube changed it so that embedding with http://youtube.com/watch/v/[youtube
code] no longer works, you need to remove the "watch/" part.
I was able to do that by simply removing it in the youtube_com.php
plugin using...

  $link = str_replace('watch/', '', $link);

This is the fix:

before:
  function pre_display($item){
    $link = $item->item_data['permalink'];
    $link = str_replace('?v=', '/v/', $link);

after:
  function pre_display($item){
    $link = $item->item_data['permalink'];
    $link = str_replace('?v=', '/v/', $link);
    $link = str_replace('watch/', '', $link); 

Original issue reported on code.google.com by carsten....@gmail.com on 10 May 2010 at 7:57

GoogleCodeExporter commented 8 years ago
I tried to include this Youtube feed

  http://gdata.youtube.com/feeds/base/users/DaRoBeat/uploads

with the current HG development version today and it works. Can you add a feed 
URL that isn't working?

Original comment by carsten....@gmail.com on 10 May 2010 at 7:15

GoogleCodeExporter commented 8 years ago
I was importing this feed: 
http://gdata.youtube.com/feeds/api/users/crashnburn007/favorites?v=2

It was importing fine, but the video player would no longer show up on any of 
the 
posts (in Chrome or Firefox) including all the old imported posts. Once I 
removed 
'watch/' as described above all the youtube embedded players started showing up 
again.

Original comment by Mitchell...@gmail.com on 11 May 2010 at 6:05

GoogleCodeExporter commented 8 years ago
I can confirm I had this issue as well importing my favorited youtube videos.
Removing '/watch' fixed the issue for me too.

Original comment by zob...@gmail.com on 12 May 2010 at 5:21

GoogleCodeExporter commented 8 years ago
Is there an update for the iframe? my embeds stopped working???

Original comment by Marcellu...@gmail.com on 3 May 2012 at 1:43