Questions tagged [avplayer]

An AVPlayer object is used to implement controllers and user interfaces for single- or multiple-item playback.

An AVPlayer object is used to implement controllers and user interfaces for single- or multiple-item playback.

3602 questions
2
votes
1 answer

iOS/AVFoundation: How to eliminate (occasional) blank frames between different videos within an AVComposition during playback

The app I’m working on loops a video a specified # of times by adding the same AVAssetTrack (created from the original video url) multiple times to the same AVComposition at successive intervals. The app similarly inserts a new video clip into an…
2
votes
0 answers

AVPlayer performance - videos are flickering when scrolling a list fast

I have a list of 60 videos which I'd like to display on a list and play while a user is scrolling. Unfortunately when I'm scrolling the list fast, the view is totally unusable - the video players flicker and there is a serious delay in scrolling…
Lukasz Czerwinski
  • 13,499
  • 10
  • 55
  • 65
2
votes
2 answers

iOS AVPlayer: pause video when screen locks

I am using an AVPlayerViewController to display a video with an AVPlayer. When I lock the phone screen the video keeps playing on the background. How can I prevent this?
2
votes
0 answers

AVPlayerViewController full screen issue (iOS 9 beta 2)

I am migrating from MPMoviePlayer to AVPlayer/AVPlayerViewController. Everything works fine, except that when I zoom to full screen via the on screen control, after the movie finished playing, the full screen mode does not go away and stuck there. I…
Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88
2
votes
0 answers

How to clean buffer or stop and start player from AVPlayer - iOS

I have this issue and this is not so easy as I thought.... I lost some of time and nothing yet. And I know, I have a method pause, but I want to stop and start and avoid crash the application.. Could anyone help, very thanks. //First. -(void)…
HenriqueAdriano
  • 119
  • 1
  • 7
2
votes
1 answer

Closed Captions/Subtitles not working for AVPlayer but are in Safari: HLS

I'm building an app that uses Apple's HLS implementation. The m3u8 file we're using looks like…
Stephen Radford
  • 557
  • 6
  • 13
2
votes
0 answers

The application does not switch the tracks in background iOS (AVPlayer)

There is an audio player is permitted to play in the background, in the background everything is fine playing, but the next track switches only if the app is active Here's an example, first you start the track, then turn the app (in the debugger…
2
votes
2 answers

AVQueuePlayer video is not working in Swift

I am currently trying to implement advertisement with video in Swift. I tried to use AVPlayerViewController and AVQueuePlayer. However AVQueuePlayer is not playing the videos after first one finishes. Here is my code: override func viewDidLoad()…
ridvankucuk
  • 2,407
  • 1
  • 23
  • 41
2
votes
1 answer

AVPlayer plays online resource but not same downloaded resource

I have an audio file downloaded from server to my documents directory. I'm trying to play the same using AVPlayer in swift but some reason unable to do so. Below is my entire code. If we replace localAudioPath with onlineResource it plays…
Penkey Suresh
  • 5,816
  • 3
  • 36
  • 55
2
votes
1 answer

Play items from MPMediaItemCollection in AVPlayer [Swift]

Here is the thing, I have a MPMediaItemCollection with user choosen items(from the library). I used the mediaPicker to do that. Now, I need to get the URL from these items so I can play them on a AVPlayer. This is the best I can find, but when I…
2
votes
0 answers

AVPlayer seekToTime -- finished is NO -- Can't get player to play again

I'm using the AVPlayer method: - (void)seekToTime:(CMTime)time toleranceBefore:(CMTime)toleranceBefore toleranceAfter:(CMTime)toleranceAfter completionHandler:(void (^)(BOOL finished))completionHandler for scrubbing a video.…
OdieO
  • 6,836
  • 7
  • 56
  • 88
2
votes
1 answer

AVPlayer seekToTime causes the player to stop playing

I have an AVPlayer that streams a radio station and has a rewind button I built. When you rewind, the method is called and WORKS about 80% of the time, successfully setting the current time of the AVPLayer back X-many seconds. However, the other 20%…
Jameson
  • 4,198
  • 4
  • 17
  • 31
2
votes
2 answers

AVPlayer (or AVAudioSession?) plays after I leave the ViewController, and when I return two are then playing

I have a viewController that streams audio from the web. When I leave that page of my app, the audio keeps playing (this is good). However, when I go back, the viewdidload method creates a second audioplayer. I can do this over and over until I have…
Jameson
  • 4,198
  • 4
  • 17
  • 31
2
votes
1 answer

AVPlayer - UILabel not visible when video starts playing in ios

I have a UILabel over my video player. On load of the video controller the label is showing, as soon as the video starts its hiding. I have already tried these below steps to overcome this issue but no luck:- 1) self.captionLbl.layer.zPosition =…
userAB
  • 21
  • 1
2
votes
1 answer

Swift - How to display thumbnail capture of video in table view cell?

From the initial research I've done, I see where the AVPlayer control is provided by Apple to play video through the iPhone. I would like to be able to able to embed a thumbnail of the videos in a UITableView. The problem I'm running into is that I…
play2win
  • 331
  • 8
  • 25