avplayeritem

AVPlayerItem addobserver issue in iOS8

匆匆过客 提交于 2019-12-07 13:37:00
问题 Hi I am playing video on my UITableViewCells using AVPlayer, It was working fine on iOS 7, but in iOS8 it crashing with following error. 'An instance 0x7c01b000 of class AVPlayerItem was deallocated while key value observers were still registered with it. Here is my code - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ......... ......... if(cell.videoPlayer!= nil && cell.videoPlayer.currentItem != nil) { [cell.videoItem removeObserver

AVPlayer's video and audio become out of sync after pausing and then resuming video

南笙酒味 提交于 2019-12-07 02:16:52
问题 I'm using AVPlayer to play videos in my app. Video playback always works perfectly, except for when you pause/resume the video. If the user presses the pause button, and then resumes the video, sometimes the audio will be ahead of the video. The video resumes at the correct location, but the audio is ahead. It's as if when you press pause, the audio keeps running. When they press the pause button, all I am doing is calling the pause method of the AVPlayer , and I have also tried setting it's

AVPlayer Not Loading Media In Background

不打扰是莪最后的温柔 提交于 2019-12-06 11:35:35
When running in the background, my implementation of the AVPlayer is unable to play audio (e.g. podcast) that is downloaded, but is able to play songs that are stored locally. Failure to play in the background is only when the phone is disconnected from my computer. If my phone is direct connected to my computer/debugger, any media that is local or is downloaded plays without a problem. In the foreground, there is also no problem playing either media type. Here is my implementation: AVPlayer *moviePlayer; AVPlayerItem *playerItem; NSURL *address = /* the url of either a local song or remote

AVPlayer's video and audio become out of sync after pausing and then resuming video

北城余情 提交于 2019-12-05 07:46:56
I'm using AVPlayer to play videos in my app. Video playback always works perfectly, except for when you pause/resume the video. If the user presses the pause button, and then resumes the video, sometimes the audio will be ahead of the video. The video resumes at the correct location, but the audio is ahead. It's as if when you press pause, the audio keeps running. When they press the pause button, all I am doing is calling the pause method of the AVPlayer , and I have also tried setting it's rate property to 0.0 which is supposed to be the exact same thing according to the documentation. I

Loading issues with AVPlayerItem from local URL

Deadly 提交于 2019-12-05 04:49:33
问题 I am working on a custom video player using AVPlayer. I load videos stored on the local file system in the Cache folder (NSCache). I initialize the player like this: self.playerItem = [[AVPlayerItem alloc] initWithURL:self.localURL]; [self.playerItem addObserver:self forKeyPath:NSStringFromSelector(@selector(status)) options:NSKeyValueObservingOptionInitial context:nil]; self.avPlayer = [[AVPlayer alloc]initWithPlayerItem:self.playerItem]; [self.avPlayer addObserver:self forKeyPath

AVPlayer fails with AVPlayerItemStatusFailed (OSStatus error -12983)

时光总嘲笑我的痴心妄想 提交于 2019-12-04 02:18:20
Sometimes AVPlayer fails with AVPlayerItemStatusFailed and after that failure occurred, AVPlayer continues to failed with AVPlayerItemStatusFailed . I tried to clear the AVPlayer instance and create new one, but I cannot achieve AVPlayerItemStatusFailed failure to solve. Also removingFromSuperview UIView with AVPlayer instance and initializing new item with AVPlayer does not solve the problem. So I figured that out AVPlayer couldn't been cleared completely. Is there anybody suggest anything to try for clearing the AVPlayer completely and make it works after failure? Error log: Error Domain

AVPlayer fails to play video sometimes

谁说胖子不能爱 提交于 2019-12-03 13:29:35
问题 I'm having grid of videos, AVPlayer sometimes fail to play video and showing this disabled icon with following error, Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped" UserInfo={NSUnderlyingError=0x7f927ede4210 {Error Domain=NSOSStatusErrorDomain Code=-12939 "(null)"} , NSLocalizedFailureReason=The server is not correctly configured., NSLocalizedDescription=Operation Stopped}) but same video getting played later on, so it is random issue. Any help on what's going wrong? 回答1:

AVPlayer fails to play video sometimes

跟風遠走 提交于 2019-12-03 03:28:47
I'm having grid of videos, AVPlayer sometimes fail to play video and showing this disabled icon with following error, Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped" UserInfo={NSUnderlyingError=0x7f927ede4210 {Error Domain=NSOSStatusErrorDomain Code=-12939 "(null)"} , NSLocalizedFailureReason=The server is not correctly configured., NSLocalizedDescription=Operation Stopped}) but same video getting played later on, so it is random issue. Any help on what's going wrong? Search Error I believe there are a lot of people, like me, are looking for the solution of this problem. I spent

How to find AVPlayer current bitrate

时间秒杀一切 提交于 2019-12-03 00:47:59
I am trying to fetch bit rate at which the AVPlayer is playing the video stream . I tried with observed bit rate property of AVPlayerItemAccessLogEvent , but it gives very high value.After exploring further on Observed-bit-rate property I understood that this property shows the value of download rate of a segment .I need to know the bit rate at which the player is playing the stream. The graph below shows Observed bit vs Indicated bit rate for the LIVE stream. Kindly give your suggestion on this issue. I tried the following link but no luck : https://stackoverflow.com/a/14845997/1730345 .

AVPlayer was deallocated while key value observers were still registered with it

时光毁灭记忆、已成空白 提交于 2019-12-02 17:04:24
I am creating a simple media player app. My App is crashed when first link is played and I clicked second link in uitableview. - (void)viewDidLoad { [super viewDidLoad]; arrURL = [NSArray arrayWithObjects: @"http://yp.shoutcast.com/sbin/tunein-station.pls?id=148820", @"http://www.kcrw.com/pls/kcrwmusic.pls",@"http://yp.shoutcast.com/sbin/tunein-station.pls?id=175821",@"http://yp.shoutcast.com/sbin/tunein-station.pls?id=148820",@"http://yp.shoutcast.com/sbin/tunein-station.pls?id=70931",nil]; url = [[NSURL alloc] init]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: