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

Check play state of AVPlayer and add overlay view to AVPlayerViewController

i want to check if AVPlayerViewController is playing video or its still buffering.i also want to add overlay view in this AVPlayerViewController with next and previous button. with the following code my video is buffering but it shows normal…
Prashant Ghimire
  • 518
  • 4
  • 20
0
votes
1 answer

How to add custom activity indicator on AVPlayerViewController in tvOS swift

I am working on tvOS app. I have multiple videos in grid formate. I used AVPlayerViewController to play videos in the app. AVPlayerViewController shows default activity indicator but my requirement is add to custom activity indicator in…
Vipulk617
  • 799
  • 1
  • 7
  • 23
0
votes
1 answer

Video is restart in UITableViewCell when it appears in a visible cell

I am loading a AVPlayerViewController in my UITableViewCell and it works good but I am trying that when a cell is visible play video and when a cell is not visible pause video. The problem is that the video load programmatically in the cell and when…
corocraft
  • 150
  • 3
  • 13
0
votes
1 answer

Swift AVPlayerViewController Done button to close app

i have a question about the "Done"-Button in iOS Player, is it possible to use the Done-Button as a Exit or Close Button for Apps coded with Swift? App that i want to build is a Standalone App with only one video, when i click the App Button on the…
Xeven Elewen
  • 65
  • 1
  • 1
  • 9
0
votes
0 answers

AVPlayerViewcontroller play video url issues

My Code: This is our code NSURL *videoURL = [NSURL URLWithString:strVideo]; playerController = [[AVPlayerViewController alloc]init]; [[NSNotificationCenter defaultCenter] addObserver:self …
ragu
  • 133
  • 2
  • 10
0
votes
1 answer

Forward and backward is not working when app enter background to foreground during video play in tvOS

I am working on tvOS app using swift. I am using AVPlayerViewController to play video following Apple demo app(UIKit Catalog (tvOS): Creating and customising UIKit Controls). Everything is working fine, but app enter background to foreground during…
Vipulk617
  • 799
  • 1
  • 7
  • 23
0
votes
1 answer

AVPlayerViewController will not dismiss when Notification called

My Code: NSURL *videoURL = [NSURL URLWithString:strVideo]; playerController = [[AVPlayerViewController alloc]init]; playerController.player = [AVPlayer playerWithURL:videoURL]; playerController.view.frame = self.view.frame; …
ragu
  • 133
  • 2
  • 10
0
votes
1 answer

Drawing on AVPlayer

I'm having a video, on which I want my users to draw on the video. I'm able to achieve that. However, when the device orientation gets changed, the drawing gets distorted. The demo source code can be found from below…
0
votes
2 answers

Change position of AVPlayerViewController controls

I have an AVPlayerViewController with an AVPlayer inside. By default the playback controls appear on the bottom of the view, is there a way to make them appear on top of the view instead?
Alk
  • 5,215
  • 8
  • 47
  • 116
0
votes
2 answers

I don't have interactivity with the video player when I put it in a pop-up

When I click on a picture, I show a pop-up with a video in it. In that pop up, a video is launching automatically. The problem is that I don't have interactivity with the video (play, pause, etc...). So for now, I found the way to loop it with the…
ΩlostA
  • 2,501
  • 5
  • 27
  • 63
0
votes
0 answers

AVPlayer Not Playing Videos

I'm trying to play video from my parse server I'm getting empty video player And when i print the url i get the correct video url let thevideo:PFFile! = (self.selectedmsg["file"] as! PFFile) let url:NSURL = NSURL(string: thevideo.url!)! …
0
votes
1 answer

How to fix AVPlayer position on scrollable view or How to fix it in a view

Do anybody have idea about how to fix AVPlayer position on a scroll-able view i am using the following code to set the AVPlayer frame but when the device size changes it remains of same size on different size and also i have a scrollable view so…
vicky
  • 253
  • 2
  • 14
0
votes
1 answer

AVPlayerViewController not presenting in Xamarin.iOS app

i am new to Xamarin.i am trying to play sound using AVPlayerViewController in Xamrin.iOS from list view.Here is my button Action. var playBtn = new Button () { WidthRequest = 50, HeightRequest = 50, BackgroundColor = Color.Transparent, Command = new…
0
votes
2 answers

I can't load video file from local server in swift

I'm working with iOS using Swift. I want to load a video file using AVPlayer in Swift. I was able to load an image and a text file from the local server. But I couldn't load a video file. This is the code that I'm using. let movieUrl =…
shin
  • 11
  • 3
0
votes
2 answers

avplayer plays video on simulator not on device?

i am having issues with playing a video through url using avplayer and avplayerviewcontroller it plays fine on simulator but doesnt work on device. Is it a problem with the static ip i have been using as follows -…