Android-youtube-player: How to change videoId?

Created on 5 Jan 2020  路  8Comments  路  Source: PierfrancescoSoffritti/android-youtube-player

I developing app like this https://youtu.be/eouC8RUmHh8
when new video selected, videoid has changed but nothing happen.
how can i do? Thanks

question

All 8 comments

I don't understand.

image

when I change videoId, youTubePlayerView not change
It seems that cueVideo accept one video one time.

cueVideo is meant to accept one video at a time.

yep. how to change youTubePlayerView display when I change videoId?
i tried all abtract listener but didn't work

Just call cueVideo with the new video id and the new video will start playing.

example: i have youTubePlayerView and button.
i init youTubePlayerView first like this
image

and button
image

but when i click button, youTubePlayerView change nothing (thumbnail or click play ...)

That's wrong, you need to keep track of the first YouTubePlayer and call cueVideo on that.

YouTubePlayer

Thanks, I resolved my problem with the help of this comment

Was this page helpful?
0 / 5 - 0 ratings