fix(FixYoutubeEmbed): Fix Error 15 in Youtube Embeds#3736
Conversation
140a27f to
7c577f9
Compare
|
Made a small modification to the PR so it won't generate a plugin error message in the event the plugin is disabled and we run into a |
7c577f9 to
70e4d10
Compare
|
Sorry for force-push spam. I didn't realize that the github ui merge would be non fast forward and I had to undo what github did to the repo lol. sigh >.> |
fc60448 to
80de315
Compare
d49f5ed to
809871f
Compare
|
I made some changes to remove the logging statements that weren't previously part of the plugins, and to move the CSP editing from the main CSP file into the plugin itself so that users who aren't opted-in to using the plugin don't have any modifications to their CSP. I also added additional checks to ensure the plugin doesnt have null dereferences or array out of bounds accesses done within the frame javascript context. |
f23285d to
a0ba51f
Compare
a0ba51f to
754dcbd
Compare
|
Just updated the branch to match main. If there is anything that needs to be done to make this mergeable please let me know. |
7267eab to
04b5c89
Compare
89cadf8 to
1d9daaa
Compare
1d9daaa to
b97a473
Compare
b97a473 to
9aa46c7
Compare
Fix "Error 15" generated by YouTube within FixYoutubeEmbed plugin Add youtube-nocookie.com domain to CSP (when FixYoutubeEmbed is enabled) Add support for youtube-nocookie.com domain to youtubeAdblock.desktop Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
9aa46c7 to
74b7224
Compare
TLDR:
This should fix the "Error 15" in youtube embeds related to youtube identity verification. This also adds detection and workaround for the Youtube "you look like a bot" blocks and attempts to reload the embed in that case. Also modifes the adblock plugin to be aware of the non-standard (but google official)
youtube-nocookiedomain used to bypass the identity error.More in depth:

When attempting to play a blocked video with the FixYoutubeEmbed plugin, I kept getting error despite the plugin technically "working" (as in, the UMG block was bypassed but the video still would not play).
Upon investigation, this was related to Youtube's identity verification policies as shown in the debug message for the javascript player:
Internet research revealed that Youtube is looking for a cookie to be set in order to validate age, and it defaults to failing you if the hueristics that generate the cookie have not run and provided you an identity cookie. After switching to the
youtube-nocookie.comdomain, which is Youtube's official GDPR compliant replacement foryoutube.com, I was able to solve this problem because in that environment no cookie can be expected, which side steps the issue entirely. However, I also needed to add it to the CSP for Vencord to preventframe-srcmismatch related CSP errors. After fixing that problem, I ran into a new issue - Youtube was repeatedly detecting me as a bot and refusing to play the video without login (which is impossible, or at minimum extremely difficult in the embedded context). I added additional code to handle the bot blocking in addition to the original block workaround for the UMG style blocks. Finally, I noticed that the ad blocking wasn't always working because of the new domain, so I modified the youtubeAdblock plugin to be aware of the possibility of theyoutube-nocookie.comdomain.