Skip to main content
Improved wording, formatting, etc.
Source Link
Pang
  • 10.2k
  • 146
  • 87
  • 126

Youtube Api android autostart YouTube API Android auto start

I use Youtube ApiYouTube API in my app, but my. My problem is it's, the video does not auto play, mustand the user has to press the play button to start playing.

My code is:

setContentView(R.layout.playerview_demo); ((YouTubePlayerView)findViewById(R.id.youtube_view)).initialize(DEV_KEY, this); 

youtube_viewyoutube_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?

Youtube Api android autostart

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); ((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" /> 

YouTube API Android auto start

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?

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); ((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" /> 

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); ((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" /> 

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); ((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" /> 
Source Link
DzungPV
  • 1.9k
  • 3
  • 21
  • 26

Youtube Api android autostart

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); ((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" />