I am developing a Flutter app (Android 12 and Android 14 tested) and embedding YouTube videos using youtube_player_iframe (or youtube_player_flutter).
The videos:
However, inside the Flutter app, the video does not load and shows:
Error code: 152-4
"This video is unavailable. Watch on YouTube."
Environment:
Flutter SDK: 3.x
Android device: Moto G60 / Android 12
Another test device: Android 14
WebView updated
Example initialization code:
YoutubePlayerController(
initialVideoId: videoId,
params: const YoutubePlayerParams(
autoPlay: false,
showFullscreenButton: true,
),
);
Questions:
Why would a video work in browser but fail inside a Flutter embedded player?
Is error 152-4 related to YouTube embed restrictions?
Is this a recent YouTube policy change?
Any help would be appreciated.