I use YouTube API in my app. My problem is, the video does not auto play, and the user has to press the play button to start playing.
My code:
setContentView(R.layout.playerview_demo);
((YouTubePlayerView)findViewById(R.id.youtube_view)).initialize(DEV_KEY, this);
youtube_view
layout:
<com.google.android.youtube.player.YouTubePlayerView
android:id="@id/youtube_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
How do I make the video start automatically?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…