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

tvOS hiding time bar, while not losing audio menu?

In my tvOS app I am playing an audio only stream, with no defined length. What I am finding is the time bar at the bottom of the screen display time indicators (at left and right) just flicker between 0:00 and the time that the stream has been…
Andre M
  • 6,649
  • 7
  • 52
  • 93
0
votes
1 answer

Displaying artwork for audio stream in Swift and AVPlayer?

I am using an AVPlayerViewController to play an audio stream, on tvOS, and I am now wanting to have some associated artwork displayed at the same time. I am not sure whether I should be somehow overlaying it on top or be telling the…
Andre M
  • 6,649
  • 7
  • 52
  • 93
0
votes
1 answer

What happens to the app playing video (using AVPlayer) when a phone call comes?

According to Raywenderlich, the app goes to inactive state. Inactive: When your app is running but something happens to interrupt it, like a phone call, it becomes inactive. Inactive means that the app is still running in the foreground but…
Utsav Dusad
  • 2,139
  • 4
  • 31
  • 52
0
votes
1 answer

tvOS AVPlayerItem external artwork metadata size

Ok so I’m adding an image to the Info tab of the AVPlayerViewController as such: let artworkMetadataItem = AVMutableMetadataItem() artworkMetadataItem.locale = NSLocale.currentLocale() artworkMetadataItem.identifier =…
David Baez
  • 1,208
  • 1
  • 14
  • 26
0
votes
0 answers

Need Sample Project in objective c Using AVPlayerViewController

I have tried searching, but have not had much luck finding a project that uses the AVPlayerViewController class. I am interested in adding custom buttons and changing the colour of the UI. I can't use CocoaPods and my coding language is Objective C.
rleedev
  • 51
  • 5
0
votes
1 answer

How to show ads on TVOS using AVInterstitialTimeRange?

When playing a movie, I would like to show some ads using AVInterstitialTimeRange. I was able to create the "dots" on the progress bar when playing the movie, but how do I actually present the ads? so far this is my code to present the ads. NSArray…
0
votes
1 answer

AVPlayerViewController - UIButton not triggering video

I am using AVPlayerViewController in order to play a .mov file (TeethingFinal.mov) in my project. The funny thing is, I have the feature working perfectly with two other buttons on the same ViewController but for some reason will not launch the…
pmoney13
  • 1,075
  • 3
  • 11
  • 19
0
votes
1 answer

AVPlayerViewController does not play Videos by url

I tried to play a video by url in an AVPlayerViewController. The AVPlayerViewController is set in my storyboard and the segue connection is working properly, but the play button is crossed out and the video will not be played. So what can i do? I…
Michael Knoch
  • 151
  • 2
  • 5
0
votes
1 answer

How to pause my AVPlayer instance on tvOS?

I've been working on a tvOS app that has all the video content being displayed through AVPlayerViewController instances. I want to add a feature similar to Netflix that, when user is watching without user interaction for some time, it pauses the…
Bruno Machado - vargero
  • 2,690
  • 5
  • 33
  • 52
0
votes
1 answer

Unable to play video using AVPlayer with Swift

When I click to play video, it shows like this. Wondering why. No error is shown. I did import AVKit and AVFoundation. Also, I tested in my device and simulator. Still does not work. Any suggestions? Thanks a lot. **Print log** //
Pak Ho Cheung
  • 1,382
  • 6
  • 22
  • 52
0
votes
1 answer

AVPlayerViewController forward and rewind button disabled for hls stream but working for mp4 stream

AVPlayerViewController forward/rewind buttons beside the play button do not seem to work for HLS, but work for an mp4 stream (non - local, played from internet). How can I get it working for HLS? Is there any separate way to make it work for HLS?
basum
  • 319
  • 1
  • 3
  • 18
0
votes
1 answer

Swift. How do I remove the toolbar in an AVPlayerViewController

I'm presenting an AVPlayerViewController with an AVPlayer and are displaying a pre-roll ad in it, but I want to remove the top and button bar, or make the user unable to dismis the ViewController before the ad is done: How do I do that? here's my…
Benja0906
  • 1,437
  • 2
  • 15
  • 25
0
votes
2 answers

iOS 9: AVPlayerViewController lost controls after adding Observers

After adding observer to AVPlayer I suddenly lost the AVPlayerViewController controls. -(void)viewDidAppear:(BOOL)animated { AVPlayerItem *playerItem = [[AVPlayerItem alloc]initWithURL:_playbackInfo.streamURL]; // logo to show CGRect …
NCFUSN
  • 1,624
  • 4
  • 28
  • 44
0
votes
1 answer

Pausing a video stream with playerViewController on TVos

Running El Capitan with Xcode 7.1.1 developing TVos 9.1 / IOS 9.2 I running this code under TVos ... -(void)runVideo { self.avPlayer = [AVPlayer playerWithURL:[NSURL URLWithString:videoHLS]]; avPlayerItem = self.avPlayer.currentItem; …
user3069232
  • 8,587
  • 7
  • 46
  • 87
0
votes
1 answer

iOS: AVPlayerViewController view not removing

I created a sample video app using AVPlayerViewController. It is working fine. But the problems are after finishing the video the AVPlayerViewController view is not removing. Other problem is set the constraints for AVPlayerViewController for…
Ramesh_T
  • 1,251
  • 8
  • 19