Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PierfrancescoSoffritti authored Oct 16, 2017
1 parent 37cd4e5 commit 8a59dd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ In order to start using the player you need to add the YouTubePlayerView to your
```
Get a reference to the YouTubePlayerView in your code and initialize it
```
youTubePlayerView = findViewById(R.id.youtube_player_view);
YouTubePlayerView youTubePlayerView = findViewById(R.id.youtube_player_view);
youTubePlayerView.initialize(new YouTubePlayerInitListener() {
@Override
public void onInitSuccess(final YouTubePlayer initializedYouTubePlayer) {
initializedYouTubePlayer.addListener(new AbstractYouTubePlayerListener() {
@Override
public void onReady() {
initializedYouTubePlayer.loadVideo("6JYIGclVQdw", 0);
String videoId = "6JYIGclVQdw";
initializedYouTubePlayer.loadVideo(videoId, 0);
}
});
}
Expand Down

0 comments on commit 8a59dd5

Please sign in to comment.