s9e Media Sites

xF2 Add-on s9e Media Sites 2.15.2

No permission to download
This is a minor improvement to the lazy loader that only concerns dynamically-sized embeds such as tweets or Reddit posts.

The way dynamically-sized embeds work is that the content provider loads the embedded content then notifies the host page of the size it should be displayed as. This add-on usually acts as a middleman and caches this value for later viewings to reduce/eliminate Cumulative Layout Shift. Some content providers (most notably, 𝕏) are too eager to declare the size of their content, before their own images are fully loaded. This leads the add-on's lazy loader to create a placeholder of the correct size for the embedded content (e.g. tweet), then shrink it as the content provider incorrectly notifies that its content is smaller than expected, only to grow it back to the correct size once all content has loaded.

In this update, the lazy loader has been changed to provide a grace period before shrinking an embed. They still grow as soon as a new size has been determined, but they'll wait a little bit (5 seconds currently) before they shrink.
You can now share Reddit URLs while being tracked. 🕵

Praise Spez.

(actually the tracking ID gets lost in the shuffle when the URL is resolved so it'll act like a regular URL)
  • Like
Reactions: BattleKing
This adds support for the new spotify.link short links as well as internationalized URLs.
  • Like
Reactions: BattleKing
An option has been added to select how scraping is performed; It has four options: auto (default), native cURL calls, XenForo's client (Guzzle), or disabled. The default value is fine for the overwhelming majority of users so you don't have to care about it unless you use a special configuration for your network, in which case you should select the default XenForo client. Disabling scraping may prevent some content from being embedded.

The current default is to use native cURL calls because XenForo's client (Guzzle) does not seem support HTTP/2 at the moment. Future versions will eventually switch to use Guzzle, and the option will be removed.

In addition, defunct site Gfycat has been removed from the add-on and Facebook has been updated to support more video URLs.
An option has been added that will display a link to the original URL used to embed content. This is only available when the add-on is configured to use a [URL] BBCode instead of the [MEDIA] BBCode. The option is enabled by default buy only applies to content embedded via a [URL] BBCode.

s9e Media Sites.png


In addition, PHP requirements have been bumped to PHP 8.0+ as earlier versions are unsupported and are disappearing from Linux distributions.
The rules for determining whether a Facebook URL can be embedded have been tightened. This should lead to fewer false positives.
Support for x.com URLs has been added.
YouTube clips have their own /clip/ URLs and IDs. This update adds support for them.
  • Like
Reactions: BattleKing
This update adds support for URLs in the form @username/post/123.
  • Like
Reactions: BattleKing
Threads is a new site from Meta, better known as Facebook's parent company. Privacy-preserving browsers and extensions may interfere with Threads and prevent its content from being displayed.
This feature is accessible through the "Insert Media" dialog when posting a message. It adds two options (unchecked by default) that allows the user to look for embeddable URLs if the one they submit does not match any active media site. For example, if a user tries to submit a t.co (Twitter's URL shortener) link to a YouTube video it will not be recognized by default, but if the user checks "Use the canonical URL" then it will be recognized as a YouTube URL.
user_option.png

You can enable or disable this feature in your admin panel. When you install the add-on for the first time or you upgrade to this version, the status of this feature will match your preference for unfurling. If you have unfurling enabled, then this feature will be enabled. Otherwise, it will be disabled and you will have to manually enable it in the add-on's options.
admin_option.png

This feature will evolve based on organic usage and your feedback.
Top