2017-11-02 2 views
0

YouTube動画をUITableViewCellで再生しようとしていますが、iOS 11では再生できません。以下はコードです。YTPlayerView(youTube)iOS 11で動画を再生していない


CGRect videoFrame = CGRectMake(0, 0, cell.videoPlayerView.bounds.size.width, 211); 
YTPlayerView *player = [[YTPlayerView alloc]initWithFrame:videoFrame]; 
NSString *videoId = [[BARUtility shared] getYoutubeVideoId:content.featuredVideoUrl]; 
NSDictionary *playerVars = @{@"controls" : @"0", 
          @"playsinline" : @"0", 
          @"rel" : @"0"}; 
if (videoId.length > 0) { 
    [player loadWithVideoId:videoId playerVars:playerVars]; 
    [cell.videoPlayerView addSubview:player]; 
} 

答えて

0

あなたはコンテナにプレーヤーを追加しようと、ビデオを開始することがありますか?

関連する問題