Youtube Api android autostart

后端 未结 6 1489
梦谈多话
梦谈多话 2020-12-01 10:56

I use Youtube Api in my app, but my problem is it\'s not auto play, must press play button.

My code is:

setContentView(R.layout.playerview_demo);
((Y         


        
6条回答
  •  时光取名叫无心
    2020-12-01 11:23

    You need to use player.cueVideo("video_id");

    This will load the video, but it will not start auto playing. The video is auto playing because you're using player.loadVideo("video_id");.

    Hope it helps.

提交回复
热议问题