Default embed does not work for new youtube links

Steps to reproduce

NOTE: as a new user i can’t add more than 5 links, that’s why i added spaces on some of them.

Open or create a note, add Youtube links with the embed syntax “!()”.

If the url is “youtube.c om/watch?v=xxxxx” the embed works finde, but in some cases, youtube has started to add parameters to the querystring before the “v” parameter. I think obsidian does not look for that parameter containing the video id, instead it uses the first one.

Also, youtube now gives an option (it is official) to embed the video without cookies. This url is not recognized by obsidian.

Examples:

youtube.com/watch?v=zMaTrgUKC1w OK
youtube.com/watch?si=zda0Ly4zUzz2f8LJ&v=zMaTrgUKC1w tries to load “zda0Ly4zUzz2f8LJ” iframe works but the video is not found.
youtube-nocookie.com/watch?si=zda0Ly4zUzz2f8LJ&v=zMaTrgUKC1w Iframe does not work
youtube-nocookie.com/watch?v=zMaTrgUKC1w iframe does not work

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

Those 4 videos should be shown on the iframe.

Also, as a nice to have, an option in settings to convert “youtube.c om” embeds to “youtube-nocookie.c om” as default.

Actual result

Only the video with the first format worked well.

Environment

SYSTEM INFO:
Operating system: ios 17.4 (Apple iPad13,1)
Obsidian version: 1.5.8 (126)
API version: v1.5.8
Login status: logged in
Catalyst license: none
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

IMG_0077
IMG_0078
IMG_0079

The si part we can handle better (even though I have never seen a url in that exact format).

You can open a FR for the youtube-nocookie.

Steps to reproduce

If I paste this in Obsidian, I can play it within Obsidian
![](https://youtu.be/qjWq4ck2-0o)

If I use this link it will display, but clicking it will display an error
![]( https://www.youtube.com/watch?ab_channel=NicolevanderHoeven&v=qjWq4ck2-0o )

image

Omnivore and other capture apps pull different Youtube links depending on how you ended up on the page and more times than not those links result in the above error

Did you follow the troubleshooting guide? [Y]

Yes

Expected result

I expect the video to be playable within Obsidian as the link is valid

Actual result

It didn’t (see error above)

Environment

SYSTEM INFO:
Obsidian version: v1.6.3
Installer version: v1.6.3
Operating system: Windows 10 Pro 10.0.26120
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 3
Plugins enabled: 3
1: Google Drive Sync v0.9.9-beta-11
2: Omnivore v1.10.3
3: Local REST API v2.4.3

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

Will be fixed 1.7

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.