Когда я воспроизводю обычный контент, он отлично загружается на симуляторе.
Параметры YTPlayerView
@implementation SingleVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *videoId = @"weRHyjj34ZE";
// For a full list of player parameters, see the documentation for the HTML5 player
// at: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5
NSDictionary *playerVars = @{
@"controls" : @0,
@"playsinline" : @1,
@"autohide" : @1,
@"showinfo" : @0,
@"modestbranding" : @1
};
self.playerView.delegate = self;
[self.playerView loadWithVideoId:videoId playerVars:playerVars];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receivedPlaybackStartedNotification:)
name:@"Playback started"
object:nil];
}
Но, если в моем плейлисте есть видео высокой четкости, выдает ошибку нижеи код https://github.com/youtube/youtube-ios-player-helper
Код доступен в Git Project, просто загрузите его и измените videoId в SingleVideoViewController.
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 6668
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code 7
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 1x-1 [0000002D,01E0010F] 0001C060
Decoding failed with error code -1
Decoding: C0 0x01E00168 0x0000304A 0x22111100 0x00000000 773
Options: 480x360 [FFFFFFFF,FFFFFFFF] 0001C060