title: YoutubePlayer with ViewPager in PagerAdapter
body: <p>I am loading Youtube video in Viewpager but if there are two videos in the view pager only second video is able to play. Please help 
  I want to load all the videos in the view pager if there is more than one video only last video is able to play.</p>
  
  <p>YoutubeVideo Loader Class :- </p>
  
  <pre><code>public class YoutubePlayerControl implements YouTubePlayer.OnInitializedListener {
  private Context mContext;
  private String youtubeVideoId;
  
  public YoutubePlayerControl(Context mContext) {
      this.mContext = mContext;
  }
  
  public void playVideo(YouTubePlayerView youTubePlayerView, String videoId) {
      this.youtubeVideoId = videoId;
      youTubePlayerView.initialize(Config.KEY_YOUTUBE, this);
  }
  
  @Override
  public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
      if (!b) {
          youTubePlayer.cueVideo(youtubeVideoId);
      }
  }
  
  @Override
  public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>here is  Adapter Class : - </p>
  
  <pre><code>public class MyViewPagerAdapter extends PagerAdapter {
  
  private Context mContext;
  private List&lt;FeedMetaData&gt; feedMetaDatas;
  private LayoutInflater layoutInflater;
  private YoutubePlayerControl youtubePlayerControl;
  
  public MyViewPagerAdapter(Context mContext, List&lt;FeedMetaData&gt; feedMetaDatas) {
      this.mContext = mContext;
      this.feedMetaDatas = feedMetaDatas;
      layoutInflater = LayoutInflater.from(this.mContext);
      youtubePlayerControl = new YoutubePlayerControl(this.mContext);
  }
  
  @Override
  public int getCount() {
      return feedMetaDatas.size();
  }
  
  @Override
  public boolean isViewFromObject(View view, Object object) {
      return view.equals(object);
  }
  
  @Override
  public Object instantiateItem(ViewGroup container, int position) {
      View itemView = layoutInflater.inflate(R.layout.nojoto_series_viewpager_row, container, false);
  
      YouTubePlayerView youtubePlayerView = (YouTubePlayerView) itemView.findViewById(R.id.youtube_view);
  
      FeedMetaData feedMetaData = feedMetaDatas.get(position);
      //playing Youtube Video 
     youtubePlayerControl.playVideo(playerFragment, feedMetaData.getVideoId());
  
      container.addView(itemView);
      return itemView;
  }
  
  @Override
  public void destroyItem(ViewGroup container, int position, Object object) {
      container.removeView((View) object);
  }
  
  @Override
  public void restoreState(Parcelable state, ClassLoader loader) {
  }
  
  @Override
  public Parcelable saveState() {
      return null;
  }
  </code></pre>
  
  <p>}</p>