Questions tagged [avqueueplayer]

AVQueuePlayer is a subclass of AVPlayer used to play a number of items in a sequence.

An AVPlayer object can be used to implement controllers and user interfaces for single- or multiple-item playback. The multiple-item case supports advanced behaviors.

AVPlayer works equally well with local and remote media files, providing appropriate information about readiness to play or about the need to await additional data before continuing.

The visual content of items played can be displayed by an instance of AVPlayer in a CoreAnimation layer of class AVPlayerLayer; to synchronize real-time playback with other CoreAnimation layers, AVSynchronizedLayer can be used. An instance of AVVideoCompositionCoreAnimationTool cannot be used with an AVPlayer object; for offline rendering AVAssetExportSession should be used.

The status of a player can be observed using key-value observing. AVPlayer serializes notifications of changes that occur dynamically during playback on a dispatch queue so that remote observers can be added and removed safely. By default, this queue is the main queue (see dispatch_get_main_queue). To ensure safe access to a player’s nonatomic properties while dynamic changes in playback state may be reported, one must serialize access with the receiver’s notification queue. In the common case, such serialization is naturally achieved by invoking AVPlayer’s various methods on the main thread or queue.

199 questions
0
votes
1 answer

AVQueuePlayer crashes when I try to observe the start of the next video: AVPlayerItem was deallocated with observers

I have an AVQueuePlayer with an array of video URLs that I need to play one after the other. Everything works great until I try to add an observer to track the start of each video. To make the AVQueuePlayer auto-advance to the next video, I've got…
Z Jones
  • 2,015
  • 4
  • 23
  • 42
0
votes
1 answer

iOS - AVQueuePlayer is not playing the songs and sometimes it is crashing the application When i use mobile data

In my Application, playing multiple songs by using AVQueuePlayer through NSURLs. Everything is working fine, when i use wifi to play the songs. If i use mobile data the songs are not playing and some times app is crashing. Please help me out.
Anjaneyulu Battula
  • 1,910
  • 16
  • 33
0
votes
1 answer

AVQueuePlayer stops streaming in background (Terminate due to signal 9)

I am developing an app, which streams music from soundcloud. For this, I am using the AVQueuePlayer initialized with several AVPlayerItems. Everything works fine, until the app enters the background. It takes 1-2 minutes, then the playback stops and…
Vincent Friedrich
  • 1,027
  • 1
  • 8
  • 11
0
votes
1 answer

How do I get current playing time and total play time in AVQueuePlayer?

Is it possible get playing time and total play time in AVQueuePlayer? If yes, how can I do this? What i have tried so far : CMTime currentTime = [self.myAVQueuePlayerObject currentTime]; But it is returning the currently played duration of the…
Salman Khakwani
  • 6,684
  • 7
  • 33
  • 58
0
votes
4 answers

AVPlayerItemDidPlayToEndTimeNotification only works if forced

I been searching everywhere and I still can't find a solution to this problem. I have a AVQueuePlayer for a radio app that I am making. It has about 20 AVPlayerItems queued at a time. I added the AVPlayerItemDidPlayToEndTimeNotification observer to…
Dhananjay Suresh
  • 1,030
  • 1
  • 14
  • 28
0
votes
1 answer

MPNowPlayingInfoCenter showing as paused

I'm using AVQueuePlayer within my app to play some media. I'm attempting to use MPNowPlayingInfoCenter to show the current status of playback when the app is backgrounded. My issue is the play button is always showing, even when media is playing.…
squarefrog
  • 4,750
  • 4
  • 35
  • 64
0
votes
2 answers

AVQueuePlayer audio not playing

I have an AVQueuePlayer property which is set up as below. The NSLog statements report that the audio should be playing properly (while the app is running) however when testing in the simulator and on the iOS device itself (iPhone 5s iOS 8.1.1)…
0
votes
2 answers

How to play multiple videos, without gap

I work on iOS and i want to read videos files, one after another, without delay between videos. Also, i must to be able to refresh the playlist while playing (add videos to the queue). I've tried with AvQueuePlayer, it works fine, i can refresh the…
Julie Bsd
  • 191
  • 1
  • 2
  • 10
0
votes
1 answer

AVQueuePlayer stops playing when I navigate to previous view

I have used AVQueuePlayer several times and the default behaviour is to continue playing when you change view, but in my case when I navigate to the previous view where I came from by segue, the player stops. I put a breakpoint after dealloc to see…
user2311554
  • 3
  • 1
  • 2
0
votes
1 answer

Properties with AVQueuePlayer

I'm trying to add a List of Interviews to an AVQueuePlayer in Xamarin.iOS, and that is working for me. I do however need to be able to get some properties off the class I use to create the AVPlayerItems My Interview Class: public class Interview …
catu
  • 888
  • 6
  • 24
0
votes
1 answer

No Sound When Using AVQueuePlayer

I'm trying to play two sounds, one right after the other using AVQueuePlayer but neither is getting played. I can play them individually using AVAudioPlayer. Here is my queue player code: NSURL *hitURL = [NSURL fileURLWithPath:[NSString…
raginggoat
  • 3,570
  • 10
  • 48
  • 108
0
votes
1 answer

iOS: AVQueuePlayer does not indicate that it has stopped playback

I have an AVQueuePlayer which loads URLs to play audio files and it works well for the most part. However, I have run into a problem where after the player finishes playing a file (with another file in the queue), it will simply stop playing.…
loadedion
  • 2,217
  • 19
  • 41
0
votes
1 answer

iOS7 AVQueueplayer background loop (loop queued music in background)

This is my first post and I have a problem that I am completely stumped on. I have a AVQueueplayer with multiple mp3's posted on a server. The app plays and loops while the app is in the foreground. However, when I press the home button, queueplayer…
0
votes
2 answers

AVQueuePlayer AVPlayerItemDidPlayToEndTimeNotification fails to call

Im using AVQueuePlayer to loop through an array of AVPlayerItems. The way I'm looping it, I listen to the AVPlayerItemDidPlayToEndTimeNotification and every time its called, I add the current object to the end of the queue. heres the code: …
Yoav Schwartz
  • 2,017
  • 2
  • 23
  • 43
0
votes
1 answer

AVQueuePlayer only plays my sequence of sounds once when clicking on button the first time

I've setup an AVQueuePlayer named player in my viewDidLoad method. I also have a UIbutton method which plays that sequence. here is my view did load method AVPlayerItem *firstSound = [[AVPlayerItem alloc] initWithURL:[NSURL…