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

The next and previous controls of the default video screen with AVPlayerViewController - AVQueuePlayer, is not working

I have a list of songs to play in AVPlayerViewController, so I use AVQueuePlayer to play it. All the songs are kept in the bundle. Now, the default video screen I get the things functioning are: Play/Pause Auto switching to next video after…
4
votes
0 answers

AVPlayer Rotate View makes cannot tap to the screen

I used AVPlayer for movie player in my app. I explained the problem with diagrams. When I click Play button in movie view controller(Portrait mode),then goes to movie details view. When I tap on the screen , the navigation bar and movie player bar…
4
votes
2 answers

AVPlayerViewController inside a view is not showing the playback controls

I am working with apple tv. I have a UIView inside my UIViewController. I am adding AVPlayerViewController as subview of my UIView. UIView's frame is CGRect(x: 50, y: 50, width: 1344, height: 756). I am setting AVPlayerViewController frame equals to…
Ruchi
  • 411
  • 4
  • 13
4
votes
1 answer

Playing DRM protected video issues in AVPlayerViewController

I'm developing an iOS application of playing video app, some of the videos are DRM protected and not played in AVPlayerViewController. Please help me out in playing those videos. I have referred FairPlay Streaming notes but unable to get anything…
Dhaval Patel
  • 716
  • 1
  • 10
  • 26
4
votes
1 answer

AVPlayerViewController exit fullscreen once played

Hi, I replaced MPMoviePlayerController with AVPlayerViewController since MPMoviePlayerController is deprecated. I'm nearly there, but have one question. My movie start as a view within a view. When playing fullscreen I want it to jump back to NO…
user1737746
  • 101
  • 10
4
votes
0 answers

Add Airplay Icon to AVPlayer

The following code enables AirPlay and adds an AirPlay icon to the AVPlayer view: playerViewController.player?.allowsExternalPlayback = true var volumeView = MPVolumeView() volumeView.showsVolumeSlider = false …
Gaurav Sharma
  • 2,680
  • 3
  • 26
  • 36
4
votes
2 answers

How to detect error link play in AVPlayer swift

I'm using AVPlayer in my project to play video streaming. My project was written in Swift language. How can I detect that wrong link is played in AVPlayer? I used this: player.addObserver(self, forKeyPath: "status",…
Nguyen Hung
  • 113
  • 2
  • 7
4
votes
3 answers

Presenting AVPlayerViewController StatusBar Makes UI Jump

On button press I'm presenting an AVPlayerViewController: func playVideoPressed(sender: UIButton){ let videoURL = NSURL(string: "someUrl") let player = AVPlayer(URL: videoURL!) let playerViewController = AVPlayerViewController() …
4
votes
0 answers

Custom Menu Items in AVPlayerViewController

On tvOS, is it possible to add custom items to the AVPlayerViewController Info/Subtitles/Audio menu? Not just adding metadata items, but a whole new section. I'd like to provide an additional menu item after Subtitles for playback speed selection…
Isaac Overacker
  • 1,385
  • 10
  • 22
4
votes
1 answer

Memory Leak: AVplayerViewController

I am facing memory leaks when we play a video and return back to the parent window. See the screenshot below of readings from allocations tool. Every time, when I pop the view controller (showing video) there are some objects related to AVFoundation…
Utsav Dusad
  • 2,139
  • 4
  • 31
  • 52
4
votes
0 answers

Airplay button not showing up in AVPlayerViewController

I'm trying to get the Airplay button to appear in the native AVPlayer controls, using the AVPlayerViewController. I started a new project and am using the following block of sample code in viewDidAppear: override func viewDidAppear(animated: Bool)…
Four
  • 406
  • 4
  • 13
4
votes
1 answer

AVPlayercontroller - Adding Overlay Subviews

Depends upon the PlaybackControl Visibity How to show and hide the Custom Subview added in contentOverlayView? I want to do like Youtube TVOS app did. I tried with UIPressesEvent but it is not giving me the exact touch events. It is giving me…
Manikandan
  • 321
  • 2
  • 12
4
votes
2 answers

How to rotate screen in landscape orientation using AVPlayerViewController?

I am using autolayout and in a screen I create AVPlayerViewController with half the size of main view. I am using UITabBarViewController and UINavigationController. This screen is navigated from first child ViewController of UITabBarViewController.…
Hiren Prajapati
  • 717
  • 3
  • 10
  • 25
4
votes
0 answers

Programmatically call AVPlayerViewController's fullscreen button

I have an AVPlayer wrapped with AVPlayerViewController. My entire app is in portrait mode and AVPlayer is subview of one of the view. I want to make the video full screen automatically when device is rotated like youtube app. Is there any way to…
meteors
  • 1,747
  • 3
  • 20
  • 40
4
votes
0 answers

Detect tap on / off AVPlayerViewController controls

Based on the answer from this question, I have implemented an event handler that detects when an AVPlayerItem finishes 'naturally'(through AVPlayerItem.DidPlayToEndTimeNotification) and when it finishes because the user has used the seek bar to…
codinghands
  • 1,741
  • 2
  • 18
  • 31