HI मैं फ्रेम द्वारा धीरे-धीरे वीडियो को चलाने के लिए AVPlayer का उपयोग कर रहा हूं। मैंने इसके लिए इस कोडिंग का इस्तेमाल किया। मैं वीडियो चलाने में सक्षम नहीं था। कृपया मेरी समस्या देखें।एवीप्लेयर वीडियो फ़ाइल नहीं चला रहा
UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)];
newView.backgroundColor = [UIColor yellowColor];
NSString *videoName = [fileNameArray objectAtIndex:indexPath.section];
NSString *url = [Utilities documentsPath:[NSString stringWithFormat:@"OSC/%@/%@.mov",videoName,videoName]];
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:url]];
//AVPlayer *avPlayer = [[AVPlayer playerWithURL:[NSURL URLWithString:url]] retain];
AVPlayer *avPlayer = [[AVPlayer playerWithPlayerItem:playerItem] retain];
AVPlayerLayer *avPlayerLayer = [[AVPlayerLayer playerLayerWithPlayer:avPlayer] retain];
avPlayerLayer.frame = self.view.frame;
[newView.layer addSublayer:avPlayerLayer];
[self.view addSubview:newView];
[avPlayer play];
avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[avPlayer currentItem]];
ज़रूर, कृपया मेरी समस्या के बारे में कुछ सुझाव दे कृपया .... – Ganesh