Android-youtube-player: java.lang.IllegalStateException: This YouTubePlayerView has already been initialized.

Created on 1 May 2020  路  3Comments  路  Source: PierfrancescoSoffritti/android-youtube-player

I am using the YouTubePlayerView in my recyclerview, so when the video id is repeated, i am getting this error. Please help me.

Thanks in advance.

question

All 3 comments

Clearly you are trying to initialise the same YouTubePlayerView multiple times. This is wrong. You should have a YouTubePlayerView for every item in your recyclerview.

how can we make youtube player for every recyclerView items?
It is dynamic.
Can we override the initialization or load video on the same initialization?
???????????????

Just put one in every viewholder

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbartusiak picture jbartusiak  路  6Comments

raghavsatyadev picture raghavsatyadev  路  9Comments

divyas93 picture divyas93  路  7Comments

Mischmo picture Mischmo  路  3Comments

heeyounglee picture heeyounglee  路  3Comments