Questions tagged [avplayeritem]
277 questions
                    
                    34
                    
            votes
                
                5 answers
            
        AVPlayer was deallocated while key value observers were still registered with it
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:…
        
        Mihir Oza
        
- 2,768
 - 3
 - 35
 - 61
 
                    24
                    
            votes
                
                6 answers
            
        Stop AVPlayer and restart MP3 file again
I want to start, pause and stop (same as restart) my mp3 File and I'm using AVPlayer. I get the files from a server.
To start the song I do:
[self.player start];
To pause I do:
[self.player pause];
but when I want to stop the song and reload it,…
        
        Davis
        
- 1,253
 - 4
 - 17
 - 38
 
                    22
                    
            votes
                
                2 answers
            
        AVPlayer too long and with delay to readyToPlay and play server music in swift
I tried to buffer and immediately play remote url audio with swift language.
but problem is with long time to  readyToPlay case and play.
for example a sound url takes about 12 to 15 second to run.
this is my code :
var asset: AVAsset!
var player:…
        
        Saeid
        
- 2,261
 - 4
 - 27
 - 59
 
                    21
                    
            votes
                
                6 answers
            
        Better way to do skip to previous with AVQueuePlayer?
I am using an AVQueuePlayer in my app. I have a two swipe gestures to skip to next and skip to previous avplayeritems. Right now to do skip to next I am just calling advanceToNextItem on the avqueueplayer which works well.
However the skip to…
        
        Tyler
        
- 2,346
 - 6
 - 33
 - 59
 
                    17
                    
            votes
                
                2 answers
            
        Add custom controls to AVPlayer in swift
I am trying to create a table view such that I am able to play videos . I am able to do this using AVPlayer and layer.
I want to add a custom play and pause button with a slider to the bottom of a video view.
AVPlayerController comes built in with…
        
        A.S
        
- 798
 - 1
 - 10
 - 32
 
                    16
                    
            votes
                
                1 answer
            
        AVPlayer stalling on large video files using resource loader delegate
I am using this approach to save the buffer data of the AVPlayer for video files. Found as the answer in this question Saving buffer data of AVPlayer.
iPhone and iPad - iOS 8.1.3
I made the necessary changes to play video and it is working very…
        
        Paul Cottrell
        
- 260
 - 2
 - 9
 
                    14
                    
            votes
                
                1 answer
            
        AVPlayer fails to play video sometimes
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…
        
        BaSha
        
- 2,356
 - 3
 - 21
 - 38
 
                    14
                    
            votes
                
                2 answers
            
        Replaying AVPlayerItem / AVPlayer without re-downloading
I have an AVPlayer class all set up that streams an audio file. It's a bit long, so I can't post the whole thing here. What I am stuck on is how to allow the user to replay the audio file after they have finished listening to it once. When it…
        
        AndroidDev
        
- 20,466
 - 42
 - 148
 - 239
 
                    12
                    
            votes
                
                0 answers
            
        Exporting Asset to Filesystem via AVAssetExportSession always fails - Swift 3
I want to export a .mp4-video stored in an AVPlayerItem to the filesystem. 
If that succeeds, I want to get it into a NSData-variable (but that is not part of the question, just wanted to tell you why I want to store it into the Filesystem in the…
        
        Marcel
        
- 121
 - 8
 
                    10
                    
            votes
                
                3 answers
            
        AVPlayer fails with AVPlayerItemStatusFailed (OSStatus error -12983)
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…
        
        instback
        
- 131
 - 2
 - 15
 
                    9
                    
            votes
                
                1 answer
            
        Display multiple videos using AVPlayer and AVPlayerLayer on UICollectionView
I'm working an application displaying "n" number of videos on full screen using AVPlayer & AVPlayerLayer classes on UICollectionView Cell with horizontal scroll. I was set paging enabled on UIScrollView. Because I need to play only current position…
        
        Ram
        
- 764
 - 1
 - 7
 - 20
 
                    9
                    
            votes
                
                1 answer
            
        Check when resources are available from AVFoundation
I'm using AVFoundation and creating AVPlayer's but getting some errors as shown below.
These are the 2 errors:
2017-01-06 15:51:19.974693 DemoApp[11855:3855225] Video player Status
  Failed: player item error = Error Domain=AVFoundationErrorDomain
…
        
        JEL
        
- 1,540
 - 4
 - 23
 - 51
 
                    9
                    
            votes
                
                4 answers
            
        AVPlayerViewController stops after returning from full screen
I have an AVPlayerViewController which I initialize with an AVPlayer and some AVPlayerItem (iOS 10, Xcode 8, Objective C).
The AVPlayerViewController is presented "inline" inside some subview, and everything works perfectly with the native playback…
        
        mllm
        
- 17,068
 - 15
 - 53
 - 64
 
                    9
                    
            votes
                
                2 answers
            
        AVAsset Orientation/Rotation issue
Tried to use Ray great tutorial to fix the orientation issue.
left - how the video should look(portrait), right - unwanted rotated result
Code used
   func setUpVideoNew()
    {
        let originalVideoTrack =…
        
        Roi Mulia
        
- 5,626
 - 11
 - 54
 - 105
 
                    9
                    
            votes
                
                3 answers
            
        Terminating app reason: 'An instance of AVPlayer cannot remove a time observer that was added by a different instance of AVPlayer.'
I am using Apple's document demo. Here is the link for demo:
AVPlayerDemo
my application is crashed after following steps:
1) Play song
2) fast forward from seek bar.
3) Click on next, 
4) fast forward from seek bar.
Here is my crash Log:  …
        
        Mihir Oza
        
- 2,768
 - 3
 - 35
 - 61