I’m not 100% sure on this but isn’t it down to the oEmbed vendor to pass across the HTML markup once a request is made?
Hi @henrywright-1
I had no idea that Buddypress relied on any 3rd-party support.
What I do know is that someone was nice enough on WP forums to write me up a plugin that adds wmode=”opaque” to the resulting Youtube embed codes – so I’d imagine there wouldn’t be much of a problem with BP’s oEmbed files from adding something on both ends of the resulting HTML.
@number_6
BuddyPress doesn’t rely on 3rd-party support as far as I know. oEmbed support is provided by WordPress.
Take YouTube for example. If you paste a YouTube video’s link into your blog post, your WordPress blog (the consumer) will make a request to YouTube (the provider). YouTube then responds with an oEmbed response. The HTML therefore gets pulled from the provider’s server.
That is how I understand the process to work. Hope it helps.
@henrywright-1
Yes, but intercepting that embed code before it’s “printed” on the activity stream is possible. I don’t know how to read PHP, but this is how this fellow did it:
http://pastebin.com/11ppWvL0
see https://codex.wordpress.org/Embeds
Make sure that the URL is on its own line…..
@valuser
Yeah. Great. Never thought of that.
@number_6 just took a look through the plugin you’ve linked to. You’re right, it is modifying the HTML that you’re pulling from YouTube. So what you’re asking can be done easily enough. Have you asked the plugin author to modify the plugin for you?
Anyway, everything aside, have you thought about using CSS to style the HTML you’ve got?
@henrywright-1 No. But I can. My first concern regarding this thread was to suggest that the BP core be changed to do this anyway – but as my luck would have it (if I understood you), that’s a WP feature and not a BP feature. Which is sad because I’ve been using annoying-ass shortcodes from a plugin to put my Youtubes in my other blogs.
Thanks for your time and input 🙂
@henrywright-1 That’s not a bad idea. That would be the best solution granting that it creates the new line in time for the video to render – but how will I apply CSS to something that doesn’t automatically have a class/ID (still learning my CSS here).
If you right-click on the video in Chrome you can usually find the option to “inspect element”. This will let you see the HTML. The next step is to use CSS to ‘style’ the HTML.
If you’re just starting out with HTML and CSS, then try taking a look over at w3schools:
http://www.w3schools.com/html/
http://www.w3schools.com/css/
They’ve got some great tutorials. They make most of it look easy 🙂