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
0 answers

AVPlayerLooper not taking effect

In iOS 10, AVPlayerLooper was added to loop videos in an AVQueuePlayer. I've viewed the official Apple documentation, but it is not clear at all - on top of that, the sample project provided is only in swift. I want to know how to run AVPlayerLooper…
Solsma Dev
  • 481
  • 6
  • 22
0
votes
1 answer

Memory leak from looping SKVideoNode (only on actual device)

I have a memory leak that I cannot diagnose. I have tried multiple approaches to creating a seamlessly looped video - Besides AVPlayerLooper, all of the approaches I've encountered and tried involve creating an observer to watch…
0
votes
0 answers

How to save an array of AVPlayerItems to file or nsuserdefaults

I am currently trying to figure out a way to create a playlist from an array of avplayeritems and save the array to the nssuserdefaults but it wont work. here is some code AVAsset *asset = [AVAsset assetWithURL:_videoURL]; AAPLPlayerViewController…
0
votes
1 answer

Reinitializing AVQueuePlayer without haing to create new AVPlayerLayer

while playing remote HLS videos, I am re-initializing AVQueue player which is already initialized with items by using (AVQueuePlayer *)initWithItems:(NSArray *)items However, by doing this sound plays in background but the…
0
votes
0 answers

AVAudioSession/AVQueuePlayer/AVAudioPlayer in the Background Swift

Problem: I am trying to get my audio to continue to play even when the app is in the background. The desired result would be that the audio continues to play even when: the home button is pressed, the phone sleeps/is locked, and to be able to mix…
0
votes
1 answer

Can I use replaceCurrentItemWithPlayerItem with AVQueuePlayer?

I have used replaceCurrentItemWithPlayerItem: with AVPlayer but can it be also used with AVQueuePlayer? In following apple doc, it is given that: This method must only be invoked on player instances created without queues. If the player is…
Ruchi
  • 411
  • 4
  • 13
0
votes
0 answers

AvqueuePlayer not working from IOS 8.1 to 8.3 but working perfectly from IOS 8.4

I am using avqueuePlayer to play videos its not working from IOS 8.1 to 8.3 but work perfectly on IOs 8.4 onwards.
Hemant Sabale
  • 317
  • 2
  • 13
0
votes
1 answer

avqueueplayer play in background mode issue

I use avqueueplayer to play some very short audios. Once an item is completed, it shall pause for 2 second and then play the next item. The problem is if the player is paused and at the same time, I press home button, it will not play the next item…
user2053760
  • 1,673
  • 2
  • 14
  • 19
0
votes
1 answer

AVQueuePlayer plays audio only once from array

I have array of QueuePlayer as below, Print Queue Player array : ( "", "", "" ) On button click I am playing audio from above…
iGatiTech
  • 2,306
  • 1
  • 21
  • 45
0
votes
0 answers

AVQueuePlayer scrubber thumbnail always first video

I have implemented player AVPlayerViewController on tvOS using AVQueuePlayer. The playback of videos works as expected but on all videos following the first the scrubber / time slider shows thumbnails for the first video. The player is being setup…
Edward Ford
  • 1,631
  • 3
  • 13
  • 25
0
votes
0 answers

Avqueueplayer in For loop

I want to add the following method in for loop. func playQuequeSounds(time:String){ let song1 = AVPlayerItem(URL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("estimatedTime", ofType: "mp3", inDirectory:…
palios7
  • 15
  • 3
0
votes
1 answer

AVPlayerViewController forward and rewind button disabled for hls stream but working for mp4 stream

AVPlayerViewController forward/rewind buttons beside the play button do not seem to work for HLS, but work for an mp4 stream (non - local, played from internet). How can I get it working for HLS? Is there any separate way to make it work for HLS?
basum
  • 319
  • 1
  • 3
  • 18
0
votes
1 answer

AvQueuePlayer not playing audio on iPhone, only working on simulator

I have added audio files to my Xcode project so that i can play them locally using AvQueuePlayer (a subclass of AVPlayer). In order to do this I must create an array of [AVPlayerItems] which is then supplied to the AVQueuePlayer to be played…
MikeG
  • 3,745
  • 1
  • 29
  • 51
0
votes
1 answer

Video sequence in Sprite Kit leads to messy interruptions

I want to create a video sequence in Sprite Kit and use the following code: @interface VideScreenNode() @end @implementation VideScreenNode - (void)setupVideoSequence { AVPlayerItem * intro = [AVPlayerItem playerItemWithURL:[self…
Objective D
  • 799
  • 5
  • 16
0
votes
1 answer

AVQueuePlayer memory issue while looping a playlist in iOS

In my iOS application, I'm trying to play list of videos downloaded to applications' Documents directory. To achieve that target, I used AVQueuePlayer. Following is my code which leads to app crash after 6/7 times looping. @interface…
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99