Untitled


SUBMITTED BY: Guest

DATE: Dec. 17, 2013, 4:37 a.m.

FORMAT: Text only

SIZE: 653 Bytes

HITS: 3307

  1. public class PlayerTest extends YouTubeBaseActivity implements
  2. YouTubePlayer.OnInitializedListener {
  3. YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);
  4. youTubeView.initialize(DEVELOPER_KEY, this);
  5. @Override
  6. public void onInitializationFailure(Provider provider,
  7. YouTubeInitializationResult error) {
  8. Toast.makeText(this, "Error :( " + error.toString(), Toast.LENGTH_LONG)
  9. .show();
  10. }
  11. @Override
  12. public void onInitializationSuccess(Provider provider,
  13. YouTubePlayer player, boolean wasRestored) {
  14. player.cueVideo(video);
  15. }

comments powered by Disqus