1

enter image description here

i am using youtube-ios-player-helper in my application and is there any way to set video placeholder image for video ?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    VideoCell *cell= (VideoCell*)[tableView dequeueReusableCellWithIdentifier:@"cell"];

    if (cell==nil)
    {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"VideoCell" owner:self options:nil] objectAtIndex:0];
    }


//
    NSMutableDictionary* VideoDict;


        VideoDict  = [arrVideolist objectAtIndex:indexPath.row];

     [cell.playerView loadWithVideoId:VideoDict[@"video_url"]];

     tableView.separatorStyle = UITableViewCellSeparatorStyleNone;


    return cell;
}
Night Fury
  • 38
  • 6
  • 1
    http://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api ? – Larme Oct 04 '16 at 10:27
  • @Larme i have uploaded a gif in my question... i want to set placeholder image instead of that white space – Night Fury Oct 04 '16 at 10:52
  • Put an UIImageView above to charge the preview/thumbnail (with SDWebImage for instance) and when the playerViewDelegate (`playerViewDidBecomeReady:`) is called, hide the UIImageView. – Larme Oct 04 '16 at 11:27

0 Answers0