Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Soundscapes not playing #12

Open
Beingpax opened this issue Feb 8, 2024 · 4 comments
Open

Custom Soundscapes not playing #12

Beingpax opened this issue Feb 8, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Beingpax
Copy link

Beingpax commented Feb 8, 2024

Love how fast the plugin is adding new features.

I'm trying to add a custom soundscape for youtube video. and its showing that the video is not available on youtube.

63200

@error451
Copy link

error451 commented Feb 8, 2024

I guess this is a reason: https://stackoverflow.com/a/59640711/19935682 >

YouTube forbids embedding some videos in a localhost environment without a public domain, but your video can be embedded with no issue through a public domain/ sub-domain try the same using webhosting apps or online html tools.

I had the same issue with Sky COTL soundtrack and when i save the html iframe code from share > embed to local html file (or directly in an obsidian note) i got the same Video unavailable - Watch on YouTube error, but if i put the same code in some online html compiler like this one it works

<iframe width="560" height="315" src="https://www.youtube.com/embed/87etrUp83Yc?amp;controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

So, i guess obsidian is not exposed to public web (localhost environment without a public domain) and as it's said in stackoverflow answer YouTube forbids embedding some videos in those situations

@phthallo @andrewmcgivery what do you think, am I on the right path?

P.S. I realized that in the code the player is set to the size of 200x100 and in the documentation (mentioned in the comment) it says that the minimum required size is 200x200, I don't know if that has any impact, I just noticed it

@andrewmcgivery
Copy link
Owner

It's likely the issue with there needing to be a domain for certain videos, but I've also noticed that there is inconsistency where it works fine for some people and not for others.

From a technical perspective I could probably get around this by hosting the iframe somewhere (and then putting an iframe to that page in Obsidian) but then that adds an external dependency on me keeping (and paying for) a domain. and hosting.

Will keep brainstorming on this one but there may not be a clean fix for it.

@andrewmcgivery andrewmcgivery added the bug Something isn't working label Feb 8, 2024
@ThomasEricB
Copy link
Contributor

ThomasEricB commented Feb 14, 2024

Will keep brainstorming on this one but there may not be a clean fix for it.

I might have a great solution for this problem @andrewmcgivery! Instead of embedding from YouTube directly, you should make the video embed from a random working invidious instance as the default (with a toggle to disable invidious instancing to go direct to youtube)! I've seen a couple of websites use this as a method of a way to dodge these embed restrictions (and geo-restrictions as well)!

@n30s4m
Copy link

n30s4m commented Apr 3, 2024

This is a link that can put the ID and work ok, from the characters after the =

https://www.youtube.com/watch?v=XXHJOvXnwJw

this XXHJOvXnwJw

Others, I can't. I tried about 10 and I can't do it, but DUB is infallible.
What would be so special about this link that the others wouldn’t?
I tried several ways, getting the ID like the other one that worked, trying sharing, and always reloading the plugins and restarting Obsidian, but they didn't work. In any case, congratulations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants