Questions tagged [avplayerviewcontroller]

Using AVPlayerViewController makes it easy for you to add media playback capabilities to your application matching the styling and features of the native system players. Since AVPlayerViewController is a system framework class, your playback applications automatically adopt the new aesthetics and features of future operating system updates without any additional work from you.

SDKs

  • iOS 8.0+
  • tvOS 9.0+

Framework

  • AVKit

To find more information :

544 questions
5
votes
5 answers

How to detect fullscreen mode using AVPlayerViewController in Swift?

I am trying to detect when the AVPlayerViewController is in full-screen mode, but I'm having a difficult time achieving this. I'd like to know when the user selects the expand button to enter full screen as shown here: I've added the appropriate…
Pangu
  • 3,721
  • 11
  • 53
  • 120
5
votes
1 answer

StatusBar not adhering to the app's orientation and rotating

I have a root view controller that manages all other controllers inside it of, so I overrode shouldAutorotate and supportedInterfaceOrientations in said rootViewController like this: public override func shouldAutorotate() -> Bool { if let vc =…
Inertiatic
  • 1,270
  • 1
  • 9
  • 12
5
votes
1 answer

What video resolution and format is most suitable for ios apps?

I would like to play full-screen videos as a background in one of my apps. The problem is that videos take up a lot of space. What resolution and format is most suitable for ios apps? The main criteria are file size & loading time.
potato
  • 4,479
  • 7
  • 42
  • 99
5
votes
1 answer

How to set AVPlayer buffer empty in ios

I am using AVPlayer for play Video in my app. In my app, I have added functionality for play next/previous video so how can i set empty buffer. so, if any one have solution for this help me.
5
votes
1 answer

AVPlayer.play() in UITableViewCell briefly blocks UI

I’m trying add inline videos to my UITableViewCells a la Instagram, Twitter, Vine…etc. I’m testing out the UI with a local video file using AVPlayerController and a custom cell (see sample code below). I wait for the status of the AVPlayer to be…
Eugene
  • 1,377
  • 2
  • 18
  • 22
5
votes
1 answer

UISlider added on AVPlayerViewController contentOverlayView is not responding

I am trying to add a UISlider to control volume in AVPlayerViewController, for this i have added a UISlider on 'AVPlayerViewController.contentOverlayView'. UISlider is not allowing me to drag as if it is not enabled and its selector action method…
Suraj Mirajkar
  • 1,369
  • 10
  • 23
5
votes
1 answer

How to add a custom button to AVPlayerViewController?

Is there any way to add a 'skip 30 minutes back/forward' button to a subclassed AVPlayerViewController so it looks native (just like play/pause button)?
David
  • 125
  • 2
  • 15
5
votes
1 answer

How to disable the audio and subtitles settings in AVPlayerViewController

I would like to remove the audio and the subtitle settings button from the player (iOS8, iOS9): Player's controller initialization: - (void) configureMoviePlayer { if(self.moviePlayerController == nil) { …
Vladimír Slavík
  • 1,727
  • 1
  • 21
  • 31
5
votes
1 answer

Only Showing contentOverlayView in AVPlayerViewController when controls are showing

I'm trying to add an extra button to AVPlayerViewController using the contentOverlayView. The issue is I'd like to only show the button when the player's controls are showing. I have feeling at this stage this isn't possible but wanted to make sure.…
Brian F Leighty
  • 922
  • 11
  • 22
4
votes
3 answers

How to add cornerRadius to AVPlayerViewController in Swift?

i'm working on video player app that written in Swift. my problem is i should make AVPlayerViewController corners curve. but i want to use just AVPlayerViewController not any other classes. what i did now: fileprivate func setupPlayer() { let…
Mohammad Reza Koohkan
  • 1,656
  • 1
  • 16
  • 36
4
votes
1 answer

Sync video in AVPlayerLayer and AVPlayerViewController

I'm working with AVPlayerto show the playing video using a URL in it. There are 2 parts to it: 1. Firstly, I've embedded the AVPlayer to a view's sublayer using AVPlayerLayer, i.e. var player: AVPlayer? func configure() { let urlString =…
PGDev
  • 23,751
  • 6
  • 34
  • 88
4
votes
0 answers

Supressing AVPlayerViewController layout errors

I am using AVPlayerViewController like this: func play(url:URL, parent:UIViewController) { let player = AVPlayer(url: url) NotificationCenter.default.addObserver(self, selector: #selector(AVPlayerManager.didfinishplaying(note:)),…
4
votes
2 answers

Removing the QuickTime icon from AVPlayerViewController

I am building a screen where users can play audio files using an AVPlayerViewController. The problem is that I can't get rid of the QuickTime logo in the player view, see screenshot: My code: do { try…
jp1987
  • 121
  • 15
4
votes
0 answers

AVPlayer not playing video stream

I know this has been asked before, but the responses are out-of-date. I am using Swift 4 for iOS11+. I have an AVPlayerViewController that plays either a downloaded MP4 (this works fine), or a stream from the server (doesn't play). I have also…
Lee Probert
  • 10,308
  • 8
  • 43
  • 70
4
votes
2 answers

AVPlayer View Controller Autorotation off?

I'm working on an iOS app in portrait mode only, and it's working fine. Issue is that I'm presenting AVPlayerViewController above navigationController (both created programmatically). This player supports all the rotations (I don't know why!). I…
Fayza Nawaz
  • 2,256
  • 3
  • 26
  • 61