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

Is it possible to autorotate AVPlayer even if the device turned on "Lock Portrait Orientation"?

I want to play a video with AVPlayerViewController() from Apple's AVKit framework. well, the video plays nicely, auto rotate works well and rotate smoothly. But, is it possible to autorotate that (so it could rotate to landscape or rotate to…
3
votes
0 answers

AVPlayer video not recognize and did not play the video

i have a video in the s3 Bucket that contains videos like 1.mp4,2.mp4 and so on. Now there is a server that request the video to s3 bucket as we hit the server and i get the link as.And in my app i get the link as…
iron
  • 715
  • 1
  • 6
  • 15
3
votes
1 answer

How to replace AVPlayer thumbnail image?

Is there any way to replace AVPlayer thumbnail image? I need to add a custom image as thumbnail layer
Vinu David Jose
  • 2,569
  • 1
  • 21
  • 38
3
votes
1 answer

Seekbar visibility callback with AVPlayerViewController in tvOS

I'm working on a solution to display some elements on screen while the seekbar is visible. I have a AVPlayerViewController with a AVPlayer playing a video. I want to display some components while the seekbar is visible and hide them when the seekbar…
Noturno
  • 121
  • 1
  • 8
3
votes
1 answer

Add AVPlayer subview to UIView

I am using the following code to create a vertical scrollview with paging enabled which works perfectly fine. Now I would like to add a subview of the type AVPlayer (?) to homeView, view2, view3. I can put setupCustomPlayer() in the…
Moritz
  • 745
  • 1
  • 10
  • 32
3
votes
0 answers

put back ipad screen after video airplay ios

Scenario: I am mirroring iPad app on Apple tv. Tapping on button starts video. Video plays via Airplay on tv. let playerViewController = AVPlayerViewController() let player = AVPlayer(url: videoURL as URL) playerViewController.player =…
Saqib Omer
  • 5,387
  • 7
  • 50
  • 71
3
votes
0 answers

Debbugging a 'crossed' or disabled play button on AVPlayerViewController

I am trying to play videos in my app, but when I selected larger files from data that I download from Dropbox, I get a crossed out play button, and can't see or play my video. I understand that there must be a couple of reasons why the player might…
Jacobo Koenig
  • 11,728
  • 9
  • 40
  • 75
3
votes
1 answer

Why can not subclass AVPlayerViewController

In Apple API Reference, it says do not subclass AVPlayerViewController as above. I want to know why. I write a demo subclass AVPlayerViewController intentionally, it can play video normally. I can not find there is something is wrong.
Jeffrey Lee
  • 143
  • 2
  • 6
3
votes
3 answers

How to resume audio playing of other apps after dismissing AVPlayerViewController?

I use AVPlayerViewController to play short videos in my app. If there is an app playing audio in background before user plays a video in my app, I want the background audio playing of the other app to resume after my video player is dismissed. I…
an0
  • 17,191
  • 12
  • 86
  • 136
3
votes
2 answers

Why this Objective-C code won't play an AVPlayerViewController video?

Both are in viewDidLoad(). What's wrong with this objective-c source file? The swift version works like a charm... Xcode ver. 8.2 iOS 10 Swift (OK): let path : String = Bundle.main.path(forResource: "charlie", ofType: "mp4")! let…
huse
  • 324
  • 2
  • 11
3
votes
0 answers

How to hide system player AVPlayerViewController status bar?

I have been in the status bar system were added to the info.plist Status bar is initially hidden-YES and View controller-based status bar appearance- NO to hide the entire project, but the status bar system of AVPlayerViewController player can't…
chenbo
  • 83
  • 4
3
votes
0 answers

'unable to simultaneously satisfy contraints' error on AVPlayer

How can I fix the "Unable to simultaneously satisfy constraints" on my AVPlayer Controller? There are no constraints on the view (The AVPlayer added to the storyboard). It is a segue from a map annotation button - and the AVplayer segue is added in…
Dimitri T
  • 921
  • 1
  • 13
  • 27
3
votes
1 answer

Is there a way to prevent AVPlayerViewController from updating the lock screen via MPNowPlayingInfoCenter?

here is my problem: I've got an app playing audio files, updating the lockscreen info via MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo, and this part is working fine. But in an other view, i'm playing a video with AVPlayerViewController and…
3
votes
2 answers

check valid url to play in avplayercontroller?

I have three urls and have to check if these urls have a video link to play or not. I have to esc link if it does not contain video in url and play video from next url. This following code will help to track the playing state. let playerAV =…
Prashant Ghimire
  • 518
  • 4
  • 20
3
votes
0 answers

How Can I style the colors in the AVPlayerViewController Tab Bar Menu on Apple TV?

The AVPlayerViewController Tab Bar Menu on Apple TV is the following : It appears when you swipe down on the control. I want to change its background color to orange. Also I want to change the color of strings to orange when it's focused. I was…
CarlosAndres
  • 585
  • 1
  • 5
  • 14