Skip to content

Conversation

@davidgalarza
Copy link

🐛 Problem

YouTube recently changed their API policies, causing video playback to fail with Error 152 and Error 150 when using www.youtube.com as the base URL for embedded players.

✅ Solution

Updated the base URL from https://www.youtube.com to https://www.youtube-nocookie.com in YTSwiftyPlayer.swift.

🔧 Changes

  • Changed basePlayerURLString constant in YTSwiftyPlayer.swift
  • Uses YouTube's official privacy-focused domain for embedded content

�� Why this works

  • youtube-nocookie.com is Google's official domain for embedded YouTube content
  • Provides same functionality as youtube.com but with enhanced privacy
  • Resolves the recent API changes that broke video playback
  • Follows the same solution implemented in other YouTube libraries (e.g., youtube_player_flutter)

🧪 Testing

  • Video playback now works correctly
  • No more Error 152 or Error 150
  • Maintains all existing functionality

🔗 References

@gdncomm-elavarasan-m
Copy link

Hi, we're using this package in our app, and this PR includes a fix for an issue we're currently facing.
Could you please publish a new version with this update? Thanks a lot for your help and great work on the project!
cc @rinov @Tibimac

@Tibimac
Copy link
Collaborator

Tibimac commented Nov 19, 2025

Hi, we're using this package in our app, and this PR includes a fix for an issue we're currently facing. Could you please publish a new version with this update? Thanks a lot for your help and great work on the project! cc @rinov @Tibimac

Hi @gdncomm-elavarasan-m, sorry for the late reply but it seems that the main and original maintainer is not anymore really involved in the project but I can't affirm it without a confirmation from him.
Nevertheless for your request, I'll check it in order to create a new release in next days, hopefully before the end of this month but for sure before the end of the year ^^.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants