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
7
votes
1 answer

Swift 4: CUICatalog: Invalid asset name supplied: '(null)' when using AVPlayerViewController Only

I'm trying to play a local video file and keep getting the following log: [framework] CUICatalog: Invalid asset name supplied: '(null)' My video file is in the project directory and also in the main bundle resources. I've tried multiple versions of…
7
votes
1 answer

Remove Quicktime logo from AVPlayerViewController

I was implementing a video player using AVPlayerViewController. it showing quick time logo on iOS 11 devices while streaming the video. How to remove this? I need to use a custom image as placeholder. plase find my code : AVPlayerItem *playerItem =…
Vinu David Jose
  • 2,569
  • 1
  • 21
  • 38
7
votes
1 answer

AVPlayerViewController black screen when swiping on iOS 11

I'm using AVPlayerViewController to play a video file (H.264, AAC, MP4-Container) on an iPad-App. Everything is working in iOS 10. And also in iOS 11 it plays the video correctly. But in iOS 11, when I start swiping in any direction, it immediately…
heyfrank
  • 5,291
  • 3
  • 32
  • 46
7
votes
1 answer

Make AVPlayerViewController keep playing after done button pressed

I have an instance of AVPlayerViewController playing a live broadcast content that I am adding as a subview to my viewController's view. After switching the AVPlayerViewController to fullscreen mode and tapping Done button to exit fullscreen the…
Aymen HARRATH
  • 474
  • 3
  • 15
7
votes
6 answers

How to handle Menu Button action in tvOS remote

I am facing the strange problem with my application. Actually when i am presenting a view controller for play the video. At the video load time user press the menu button the application goes to background. While i have overwrite the Menu Button…
7
votes
1 answer

Unable to play mp4 videos in AVPlayer

I'm using AVPlayer to play videos. I couldn't play .mp4 videos.I'm getting this black screen. here is my code. `NSString *filePath = [self.videoArray objectAtIndex:index]; NSString *soundFilePath = [[NSBundle mainBundle]…
Bharu
  • 159
  • 1
  • 3
  • 13
7
votes
2 answers

How do I replace MPMoviePlayer notifications?

In iOS 9 MPMoviePlayer and all his components are deprecated. We used MPMoviePlayerController notifications, like MPMoviePlayerLoadStateDidChangeNotification, MPMovieDurationAvailableNotification, MPMoviePlayerPlaybackStateDidChangeNotification,…
6
votes
1 answer

Set background image of AVPlayerViewController

i'm using AVPlayerViewController for playing audios. Reason for using it is that it provides and handles basic controls i.e. play/pause/slider/volume. Now, i need to set background image of this view. Image will be fetched from some network…
Fayza Nawaz
  • 2,256
  • 3
  • 26
  • 61
6
votes
2 answers

Swift AVPlayerViewController Add AirPlay

I'm attempting to enable AirPlay with my AVPlayerViewController. In the document: https://developer.apple.com/reference/avkit/avplayerviewcontroller It states AVPlayerViewController automatically supports AirPlay, but you need to perform some…
Mike Walker
  • 2,944
  • 8
  • 30
  • 62
6
votes
0 answers

Disable Fullscreen Button of AVPlayerViewController

I am using the AVPlayerViewController to embedd videos into my UIView: class MyView : PopupContentView { var player : AVPlayer!; var playerViewController: AVPlayerViewController!; override func awakeFromNib() { } override func…
Mulgard
  • 9,877
  • 34
  • 129
  • 232
6
votes
2 answers

iOS 10 AVPlayer will not stream video from URL with no extension and with video/mp4 as content type

Currently, we are using a standard AVPlayer via AVPlayerViewController to play video. We are streaming video from a url in the format https://ourdomain/media/mediaid?jwt=authTokenHere. The url, as you can see, has no extension; however the headers…
Sommer
  • 206
  • 3
  • 7
6
votes
3 answers

In swift, how to detect touch while playing video in AVPlayerViewController

I have programmatically added an AVPlayerViewController to a UIViewController. I am able to receive the notification when the player is finished playing (playerDidFinishPlaying). I would also like to know if a user has touched the screen while the…
Bruce
  • 2,230
  • 18
  • 34
6
votes
4 answers

Swift AVPlayer seekToTime issue

i have this code : let punto = sender.locationInView(self.barraVideo).x let larghezzaImg : Double = Double((self.barraVideoInvisTocco?.frame.width)!) let percTocco : Double = (100 / larghezzaImg) * Double(punto) let…
Alessandro Zago
  • 793
  • 3
  • 12
  • 33
6
votes
2 answers

iOS Airplay - "Playing on your TV"

I have displayed the airplay button using this code var airplayButton: UIBarButtonItem! let airView: MPVolumeView = MPVolumeView() airView.showsRouteButton = true airView.showsVolumeSlider = false airView.sizeToFit() airView.tintColor =…
Taimur Ajmal
  • 2,778
  • 6
  • 39
  • 57
6
votes
1 answer

Display playback controls in AVPlayer

I am able to run the video, but I am not able to see the control buttons like pause and the slider to interact with the video. Similar query is asked (see here) but I do not follow the answer.
Utsav Dusad
  • 2,139
  • 4
  • 31
  • 52
1 2
3
36 37