First, let me set the stage. I’m talking about cross-posting short posts, limiting the characters to fit on:
Bluesky
Mastodon
Threads
What I’m trying to do is write a post with an embedded YouTube video below it and have the video appear as embedded on the 3 social media above. Something like this:
Because I share content about many passions, I decided to create feeds on #Bluesky to help people who'd like to follow only posts about a specific topic. And while I was at it, I recorded a video to show you how to do it.
{{< youtube doXzyEaGa1Y >}}
The problem I’m having is with the YouTube part. If I post it like above, the link doesn’t work well, specially on Threads. Imagining the problem was related to the link formating, I decided to try posting on Micro.blog using the full YouTube URL https://youtu.be/doXzyEaGa1Y. Then, after the cross-posting I went back and adjust the post on Micro.blog to {{< youtube doXzyEaGa1Y >}}
Something like this:
Because I share content about many passions, I decided to create feeds on #Bluesky to help people who'd like to follow only posts about a specific topic. And while I was at it, I recorded a video to show you how to do it.
https://youtu.be/doXzyEaGa1Y
Doing the above, fixes it on Threads. The post works perfectly with the embedded video below the text. However, Bluesky and Mastodon show the post with a clickable YouTube link below the text part, but no embedded video.
Is there a way to make the video appear as embedded on the three when cross-posting?
I’m no expert, but I think your best bet is going to include the YouTube URL in the post, and rely on the native playback functions of each network take care of that bit. And then use something like this plugin which will take any YouTube links in your posts and embed them on your own blog without any shortcodes. It’s not perfect, but I don’t think shortcodes are going to get you what you want.
That was my though too, but like I said, for some reason, Bluesky and Mastodon do not create the player like they do when we post the YouTube URL directly on them. There’s something happening when cross-posting that prevents them from creating the player. The YouTube URL is posted as a clickable URL.
That’s because each of those services is doing it’s own thing with a youtube link (like opengraph expansion of links in general) and using the youtube shortcode actually generates the HTML embed from a template, which is not a normal link style that those services understand.
Thank you. I thought that could be the case. But do you have any idea as to why when I post the full URL, the player is not created? All I get is a clickable URL.
I’m a little surprised that Mastodon isn’t showing the video preview. It almost always tries to show a preview of whatever is linked, but perhaps there is some special behavior for YouTube.
As an example from one of my posts, this is an inline link via Micro.blog + the fediverse and Mastodon does show the YouTube player:
For Bluesky, that is currently expected because we have to add special support in Micro.blog for previews on Bluesky. Bluesky doesn’t automatically handle it like some platforms. It’s more flexible because we can control it, but we have to actually add a preference for this. I’ve seen a few requests for this recently so I plan to add it soon.
If I got that right, you are telling me that if I follow your Micro.blog account from Mastodon, I can see the player on your posted on Micro.blog. That works fine here as well. The problem is with the cross-posted post on Mastodon. That one is not creating the player.
I just did another test here. I created the post below on Micro.blog and saved as draft:
This is a test.
https://youtu.be/doXzyEaGa1Y
Then, when I opened the draft, Micro.blog had automatically created the link as shown below. And if that’s a link, the other platforms will create a link instead of building the player when Micro.blog cross-post to them.
Another peculiarity is that Micro.blog is shortening the original link with the three dots. I understand it will not break the URL, but why is it doing that?
This is a test.
[youtu.be/doXzyEaGa...](https://youtu.be/doXzyEaGa1Y)
I see the same issue when posting via micro.blog app for mac, iOS, or web on linux. Mastodon does not display a player. Which, I assume is a Masto thing as creating posts there in general with video seems really weird. I love the lovely embed we get at Micro.blog and would love to see it everywhere.
For me, when cross-posting and using the youtube shortcode, all context is lost. Only the text that I add is cross-posted without any reference to the youtube video (embed, link, or otherwise).
Shortcodes are not processed in the chain that generates the cross post content – also, embeds are not permitted on almost any social platform. They all do their own unique thing based on raw link detection.
Ah, good to know shortcodes are not processed when cross-posting, I always assumed the resulting HTML would be cross-posted, possibly with some kind of stripping of unwanted tags. I just thought the same content which is shown on the micro.blog timeline would be used, and since the timeline converts the shortcode to a link I was expecting a link in the cross-posts as well. If that makes sense.
I’m 95% sure that cross posts are going through a faster markdown processing pipeline and basically remove hugo-isms like short codes, even if they didn’t embeds would get stripped out for sure.