youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {
@Override
public void onReady(@NonNull YouTubePlayer youTubePlayer) {
// Set your dynamic video ID here
String dynamicVideoId = "YOUR_DYNAMIC_VIDEO_ID";
// Load the video
youTubePlayer.loadVideo(dynamicVideoId, 0);
// Optionally, you can also set other parameters like autoPlay
youTubePlayer.play();
}
});`
I am getting this error "Method does not override method from its superclass" please suggest a solution. Thanks
` import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.listeners.AbstractYouTubePlayerListener;
youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() { @Override public void onReady(@NonNull YouTubePlayer youTubePlayer) { // Set your dynamic video ID here String dynamicVideoId = "YOUR_DYNAMIC_VIDEO_ID";