YouTube Picture-In-Picture for Telegram on macOS
@dotvhsThanks to Google, PIP inside Telegram for macOS was removed. I really missed that little feature, so I made a workaround using free and open-source tools.

Requirements
Here's what you will need:
- IINA - media player that can also play YouTube videos, download from official website
- Finicky - a little tool that you can customise to open different types of links in a specific browser/app
Setting up IINA
Once you installed IINA, launch it and go to Preferences > General and enable Quit after all windows are closed. That's all that is really needed here, proceed to next step.
Setting up Finicky
After you install Finicky, it should ask you at some point if you want to make Finicky your default browser - agree to this. It also might throw an error in notification because we're missing config file - here I will guide you how to fix that.
Below is config I wrote, all it does is rewrites YouTube links opened in Telegram for macOS and redirects them to IINA. All other links are left untouched. Create file named .finicky.js (yes, file starts with a dot) in your home directory (if you don't know where home directory is - Finder > Go > Home) and using any text editor paste this into it:
module.exports = {
defaultBrowser: "Firefox", // Use your favorite browser here
rewrite: [
{
match: ({ url }) =>
url.host.includes("youtube.com") || url.host.includes("youtu.be"),
url: ({ url }) => ({
...url,
protocol: "iina://weblink?url=https",
}),
},
],
handlers: [
{
match: ({ url, sourceBundleIdentifier }) =>
url.protocol.startsWith("iina") &&
sourceBundleIdentifier === "ru.keepcoder.Telegram",
browser: "Iina",
},
],
};
One thing you might want to change is the line that say
defaultBrowser: "Firefox",
Change it to your favorite browser (Safari, Google Chrome etc.).
Once you saved your file, you should get notification "Reloaded config successfully". If you didn't get any notification, make sure you created file properly (filename and location matters).
Feel free to message me if you found a better way to solve PIP for YouTube in Telegram. Good luck :)