CPCWiki forum

General Category => CPCWiki Discussion => Topic started by: Gryzor on 12:26, 14 March 22

Title: Testing twitter embedding
Post by: Gryzor on 12:26, 14 March 22
https://twitter.com/yorecomputer/status/1503291909200134145

Title: Re: Testing twitter embedding
Post by: Gryzor on 13:20, 15 March 22
Ok finally it's working fine with no duplicates.
Title: Re: Testing twitter embedding
Post by: BSC on 22:14, 15 March 22
Nice! How about soundcloud and the likes? Seems there is a plugin which is compatible with SMF 2.1.1

https://custom.simplemachines.org/index.php?mod=2681 (https://custom.simplemachines.org/index.php?mod=2681)
Title: Re: Testing twitter embedding
Post by: Gryzor on 11:57, 16 March 22
Ah, yes I can, but it will conflict with the current YT embedding solution. I'll look into it - had forgotten we actually have quite a few Soundcloud links here...
Title: Re: Testing twitter embedding
Post by: Gryzor on 12:03, 16 March 22
Actually wait, this should already work...

https://soundcloud.com/ultrasyd/still-rising-cracktro-amstrad

...and yet it doesn't. See, we're already using that mod :D But Soundcloud doesn't work, so I'll dig into their discussions and see if anything comes up.
Title: Re: Testing twitter embedding
Post by: Gryzor on 12:27, 16 March 22
So yeah, that's not good at all. Apparently the only way to embed it nowadays is if you take the "share/embed" code from a SC track, which looks like this:

<iframe width="100%" height="300" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/743030335&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true"></iframe><div style="font-size: 10px; color: #cccccc;line-break: anywhere;word-break: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; font-family: Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif;font-weight: 100;"><a href="https://soundcloud.com/joemcalby_zx" title="McAlby_ZX" target="_blank" style="color: #cccccc; text-decoration: none;">McAlby_ZX</a> · <a href="https://soundcloud.com/joemcalby_zx/sokoban-melancolia" title="Sokoban Perfect - Melancolía (AY-3-8912 ZX Spectrum 128 / Amstrad CPC / MSX , 1991, unreleased)" target="_blank" style="color: #cccccc; text-decoration: none;">Sokoban Perfect - Melancolía (AY-3-8912 ZX Spectrum 128 / Amstrad CPC / MSX , 1991, unreleased)</a></div>
Then you take the "src" part, decode the %3A to ':' and paste it here, so it becomes

https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/743030335
...et voilà!

https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/743030335
Title: Re: Testing twitter embedding
Post by: BSC on 20:01, 17 March 22
Quote from: Gryzor on 12:27, 16 March 22...et voilà!

Great trick, thanks for the hint! :)
Title: Re: Testing twitter embedding
Post by: Gryzor on 09:12, 18 March 22
Not really that great, can't expect people to look it up every time... :(
Powered by SMFPacks Menu Editor Mod