Hi all i'm trying to add video on a scene I can hear it but not see it, any ideas what i'm doing wrong?
my setup is:
import AVFoundation/AVFoundation.h
added AVFoundation library
-(void)didMoveToView:(SKView *)view {
fileURL = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:@"bait" ofType:@"m4v"]];
NSLog(@"FileName %@",fileURL.path);
AVPlayer* _player = [AVPlayer playerWithURL: fileURL];
SKVideoNode* _videoNode = [[SKVideoNode alloc] initWithAVPlayer:_player];
_videoNode.size = CGSizeMake(self.frame.size.width,self.frame.size.height);
NSLog(@"SKVideoNode W:%f H:%f",_videoNode.size.width,_videoNode.size.height);
_videoNode.position = CGPointMake(self.frame.size.width/2.0f,self.frame.size.height/2.0f);
_videoNode.zPosition = 1000;
[self addChild:_videoNode];
_player.volume = 0.5;
[_videoNode play];
}