Skip to content

Commit

Permalink
[fix] "Something went wrong" error for videos - take 2 (#206)
Browse files Browse the repository at this point in the history
Previous fix was applied to only one bypass, now this is applied globally
  • Loading branch information
drunkwinter committed Aug 7, 2023
1 parent 630e5d9 commit 2097b8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/unlocker/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ function getUnlockedPlayerResponse(videoId, reason) {
* Workaround: https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass/issues/191
*
* YouTube checks if the `trackingParams` in the response matches the decoded `trackingParam` in `responseContext.mainAppWebResponseContext`.
* However, the `TV Embedded Player` does not include the `trackingParam` in the `responseContext`, causing the check to fail.
* However, sometimes the response does not include the `trackingParam` in the `responseContext`, causing the check to fail.
*
* This workaround addresses the issue by hardcoding the `trackingParams` in the `TV Embedded Player` context.
* This workaround addresses the issue by hardcoding the `trackingParams` in the response context.
*/
if (isStatusValid && strategy.name === 'TV Embedded Player') {
if (isStatusValid && !unlockedPlayerResponse.trackingParams || !unlockedPlayerResponse.responseContext?.mainAppWebResponseContext?.trackingParam) {
unlockedPlayerResponse.trackingParams = 'CAAQu2kiEwjor8uHyOL_AhWOvd4KHavXCKw=';
unlockedPlayerResponse.responseContext = {
mainAppWebResponseContext: {
Expand Down

0 comments on commit 2097b8a

Please sign in to comment.