Ich entwickle eine App in objective-c.video spielen in UIView in ios
In meiner UIViewController
.h
Datei@property(weak,nonatomic)IBOutlet UIView *vvv;
.m-Datei
// to play the video
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"alphabet learning splash" ofType:@"mp4"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
self.avPlayer = [AVPlayer playerWithURL:fileURL];
self.avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
AVPlayerLayer *videoLayer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer];
[_vvv.layer addSublayer:videoLayer];
[self.view addSubview:_vvv];
[ self.avPlayer play];
Aber das Video Anzeige in der UIView von vvv.How ist nicht auf?
Einstellung Haben Sie versucht, die Frames/Grenzen der Videoansicht einstellen? –