Click here to see your recently viewed pages and most viewed pages.
Hide

YouTubePlayerSupportFragment

public class
YouTubePlayerSupportFragment
extends Fragment
implements YouTubePlayer.Provider
java.lang.Object
   ↳ android.support.v4.app.Fragment
     ↳ com.google.android.youtube.player.YouTubePlayerSupportFragment

Overview

The support fragment version of YouTubePlayerFragment. See the javadoc for YouTubePlayerFragment for information on how to use this fragment. Note that if you use this class in your project, you must also link the Android Support Compatibility library into your project.

Summary

Public constructors
YouTubePlayerSupportFragment()
Creates a YouTube fragment.
Public methods
void initialize(String developerKey, YouTubePlayer.OnInitializedListener listener)
Initialize a YouTubePlayer which can be used to play videos and control video playback.
static YouTubePlayerSupportFragment newInstance()
Creates a YouTube fragment.
Inherited methods

Public constructors

public YouTubePlayerSupportFragment ()

Creates a YouTube fragment. This constructor is public only for use by an inflater. Use newInstance() to create a YouTubePlayerSupportFragment programmatically.

Public methods

public void initialize (String developerKey, YouTubePlayer.OnInitializedListener listener)

Initialize a YouTubePlayer which can be used to play videos and control video playback. One of the callbacks in listener will be invoked when the initialization succeeds or fails.

Parameters
developerKey A valid API key which is enabled to use the YouTube Data API v3 service. To generate a new key, visit the Google Developers Console.
listener The callbacks that will be invoked when the initialization succeeds or fails.

public static YouTubePlayerSupportFragment newInstance ()

Creates a YouTube fragment.