A YouTube player integration in a Jetpack Compose app stopped working after YouTube API changes. The fix required three steps: upgrading the android-youtube-player library from 12.1.0 to 13.0.0, explicitly initializing the IFrame with IFramePlayerOptions instead of using automatic initialization, and preventing Activity recreation during rotation by adding configChanges to the manifest. These changes eliminated black screens, rotation flashes, and playback instability while simplifying the codebase by 50 lines.

7m read timeFrom proandroiddev.com
Post cover image

Sort: