The YouTube Android Player API is an experimental API version, which means it is still in development, though we do not expect major interface changes. Until the experimental label is removed, the Deprecation Policy for YouTube APIs won't apply to this version as discussed in the API Terms of Service.
public interface
YouTubePlayer.OnInitializedListener
YouTubePlayer.OnInitializedListener
com.google.android.youtube.player.YouTubePlayer.OnInitializedListener |
Overview
Interface definition for callbacks which are invoked when player initialization succeeds or fails.
Summary
Public methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when initialization of the player fails.
| |||||||||||
Called when initialization of the player succeeds.
|
Public methods
public abstract void onInitializationFailure (YouTubePlayer.Provider provider, YouTubeInitializationResult error)
Called when initialization of the player fails.
Parameters
provider | The provider which failed to initialize a YouTubePlayer . |
error | The reason for this failure, along with potential resolutions to this failure. |
public abstract void onInitializationSuccess (YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored)
Called when initialization of the player succeeds.
Parameters
provider | The provider which was used to initialize the YouTubePlayer . |
player | A YouTubePlayer which can be used to control video playback in the
provider. |
wasRestored | Whether the player was restored from a previously saved state, as part of
the YouTubePlayerView or YouTubePlayerFragment restoring its state.
true usually means playback is resuming from where the user expects it would,
and that a new video should not be loaded.
|