YouTube embedding adding ) to end
-
When I embed youtube clips into a post via adding the url or by using
wp_oembed_get('http://www.youtube.com/watch?v='.$clip_url);it displays the video and then puts a right bracket ) straight after it. I’ve tried other videos like Vimeo and they are fine. Its just YouTube. I’ve tried different YouTube videos and all do the same. When I check the source code they are added outside the iframe.
-
I noticed the same. 🙁
Is there any solution for this?it has been a few years, but I think there was an issue with inserting videos on WP. I used FitVids and it worked.
As far as I can see this is a problem on Youtube’s side. It happens if you grab the embed code from the YT page itself as well: YT generates an additional (useless) closing bracket.
I ended up assigning it to a variable and trimming it before echoing it.
`$embed = wp_oembed_get(‘http://www.youtube.com/watch?v=’.$clip_url);
$embed = rtrim($embed,’)’);
echo $embed;`Thanks, katmac_aus, that’s what I did as well, but this is rather workaround than solution.
I use the Teris theme from wpexplorer (http://www.wpexplorer.com/tetris-wordpress-theme/) – the strange thing is that I use few months already and until now all was OK.
Thanks one again for the reply!Reply from Google Data API project member: “Apologies; the engineering team has a fix for this that’s ready and will be pushed out in the near future.”
https://code.google.com/p/gdata-issues/issues/detail?id=6098
The topic ‘YouTube embedding adding ) to end’ is closed to new replies.