Questions tagged [avplayerviewcontroller]

1

votes
1

answer
221

Views

Custom Info View Controller index

Is it possible to change Custom Info View Controller's index in AVPlayerViewController? customInfoViewController A view controller that provides client-specific content and controls alongside system-provided information and settings panels. SDK tvOS 11.0+ Declaration Swift var customInfoViewControl...
mgyky
1

votes
1

answer
385

Views

Exit AVPlayerViewController fullscreen programmatically?

I am try customize AVPlayerViewController show fullscreen and I search link: How to make a AVPlayerViewController go to fullscreen programmatically?. It work when I use private method, but I can't find method exit full screen.
Tiny Dragon
1

votes
0

answer
165

Views

Load local encrypted video file Asset into AVPlayer

I want to try read the Data from a encrypted 'video' file, decrypt the data and make it run on AVPlayer. My app can download a video, the video comes encrypted from my API. All I have to do is: decrypt the file with a cypher and then it becomes a valid mp4 file. Theses steps are covered. I did the...
Rafael Natali
1

votes
1

answer
82

Views

How can I dismiss `custominfoviewcontroller` programatically on tvOS?

On tvOS 11.0+, custominfoviewcontroller is added to AVPlayerViewController. My question is how to dismiss the whole info panel after selecting something in my custom info view controller? I tried to use dismiss(animated: true, completion: nil). Although it does dismiss the info panel, the info pane...
Howard
1

votes
0

answer
27

Views

Animation on AVPlayerViewController not synchronized

I have a AVPlayerViewController that I create in this way: -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; NSURL *videoURL = [NSURL URLWithString:@'testURL']; AVPlayer *player = [AVPlayer playerWithURL:videoURL]; AVPlayerViewController *playerViewController = [AVPlayerViewCon...
Arturi
1

votes
0

answer
49

Views

AVPlayer doesn't load video after some specific count

I am using AVPlayer to load video from local storage inside the table view cell to show video multiple time. It works fine for 16 times but as I load the cell 17 times it doesn't get loaded and shows error I tried to use different video size but it still doesn't get fixed! Here Code var player : AV...
startxlabs
1

votes
2

answer
100

Views

AVPlayer not loading video from url of subdomains

I am using AVPlayer to load video url from a server. It is working for a video in the root but not in the sub-domain. My AVPlayer code is as follows: Player works with the below URL: @IBAction func btnPlayClicked(_ sender: Any) { //let videoURL = URL.init(string: 'http://musically.virgoexchange.com/...
puja
1

votes
0

answer
18

Views

cell frame size changing on rotate

I am resizing a cell frame on the iPhone X to embed an instance of AVPlayerController. When i change orientation from portrait to landscape the frame size seems to change. I end up with the controls (full screen + volume) overlapping the header and title. Would you recommend a solution other than :...
sandra oo
1

votes
0

answer
34

Views

Any alternative for AVPlayerController as it is causing issues with constraint?

I am using the following code and it is causing the constraint from the top for the view to get disturbed: let player = AVPlayer(url: fileURLs[id] as URL) let playerViewController = AVPlayerViewController() playerViewController.player = player self.present(playerViewController, animated: true) { pla...
Enrik Qaz
1

votes
0

answer
67

Views

Change display text of AVPlayerViewController based on metadata

I am writing a basic Swift audio streaming application using AVPlayer and wanted to know if it was possible to change the default display text of the AVPlayerViewController. Currently the AVPlayerViewController looks like the following when I connect to the stream successfully: When the application...
Joshua Alger
1

votes
2

answer
2.2k

Views

How to hide AVPlayerViewController control bar?

I've implemented iAd's Preroll Video Ad and I want to guarantee that my user will watch the entire advertisement. How do I hide the AVPlayerViewController's control bar so the user can not tap 'Done' and get out of the video before it finishes? self.canDisplayBannerAds = YES; [AVPlayerViewController...
Eduardo Pires
1

votes
1

answer
1.4k

Views

Can't hide status bar in AVPlayerViewController's portrait mode

I'm developing an app that first presents a UICollectionView with a bunch of buttons that modally open a subclass of AVPlayerViewController with a custom 'Over Full Screen' segue. UIViewControllerBasedStatusBarAppearance is set to YES in my Info.plist. Here's a small (had to zoom out, sorry) screens...
Peter W.
1

votes
1

answer
406

Views

Customising AVPlayerViewController progress bar

I am working on AVPlayerViewController and using it I am playing HLS video. Is it possible to add some dots at different time interval(e.g. at 10 , 20 etc minutes yellow dots) on progress bar in tvOS? Or is their any other approach using which I can achieve this.
iamDheeraj
1

votes
1

answer
179

Views

AVKit Player View Controller Segue break

I'm trying to segue from a view controller to an AVKit Player View Controller. I'm using Vuforia's framework to do image recognition on a camera. My issue is that when I try to segue over, it says that segue just doesn't exist. However, if I segue to a different controller and then segue into the vi...
Built In Parris
1

votes
2

answer
501

Views

Enable/Disable background music

To enable background music from app Spotify or Music app, I use this code: do { try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryAmbient) try AVAudioSession.sharedInstance().setActive(true) } catch let error as NSError { print(error) } But how can i reverse that, to stop allow b...
Roduck Nickes
1

votes
1

answer
870

Views

AVPlayerViewController and View's constraints

I am developing my first app using AVPlayerViewController. I need to display video stream using this class inside view. On the screenshot this view has dark blue color. Under this view I have Label and UICollectionView. When I tap on item, video is displayed but there is a problem with size of this...
Anton
1

votes
1

answer
73

Views

AVPlayer autoplays but should not (Swift)

I’ve created a very simple AVPlayer within a macOS app. import Cocoa import AVKit import AVFoundation class ViewController: NSViewController { @IBOutlet var playerView: AVPlayerView! override func viewDidLoad() { super.viewDidLoad() let videoPath = URL(fileURLWithPath: 'myPath/myFile.mp4') let vi...
ixany
1

votes
1

answer
221

Views

-[AVPlayerViewController retain]: message sent to deallocated instance

I am trying to add an AVPlayerViewController to a chat bubble so that any audio or video messages when received can be directly played in the chat bubble. My UITableView list contains many of these bubbles. But when I try to scroll the table view, the app gets crashed showing -[AVPlayerViewControlle...
Amuuu Gaikwad
1

votes
3

answer
1.4k

Views

AVPlayerController - Buttons not working on full screen

I'm trying to understand how AVPlayer & AVPlayerController works. I'm embedded my player in a view so my player has two mode : little & full screen. When it's little the play/plause button and full screen button work very well. But once it's full screen, the following buttons has no effect : play, p...
Melanie Journe
1

votes
1

answer
1k

Views

Swift AVPlayerViewController Remove Audio & Subtitles Button

I would like to remove the Audio & Subtitles button when using the AVPlayerViewController. I create the controller as follows: // Create the view controller and player let moviePlayerViewController: AVPlayerViewController = AVPlayerViewController() let moviePlayer = AVPlayer(url: videoUrl!) // Initi...
Mike Walker
1

votes
1

answer
327

Views

How to set layout constraint for AVPlayerViewController?

I have set AVPlayerViewController.How to set layout constraint for AVPlayerViewController? Thanks! start APP console displayer this warning: 2017-04-14 10:51:34.900747 robot_blue[12510:4193750] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constrain...
Xiong Yang
1

votes
1

answer
389

Views

Troubles with MPRemoteCommandCenter

I have two troubles with MPRemoteCommandCenter: 1) When I change song, remote controls delete previous song image, make default song image, make next song image. I don't want to see default image. I spent a couple of time to find a solution. 2) When AVPlayer is live streaming sound, remote controls...
Mi Ka
1

votes
1

answer
137

Views

Issue with AVPlayerViewController

I use AVPlayerViewController for play video and it's working fine. But when device map direction is running at that time don't show AVPlayerViewController status bar. So i can't close AVPlayerViewController.
Keyur Hirani
1

votes
1

answer
285

Views

avplayerviewcontroller control events

On my view controller i have added a AVPlayerViewController as a child controller. Its able to play both audio as well as video files from network. However i would like to capture the progress of the video/audio when a pause button or a back button is pressed. I am not sure what event to subscribe...
cableload
1

votes
1

answer
365

Views

AVPlayerViewController show black screen some times

I create an player and working fine in most part of times. In some situations (that I didn't realized why) screen video stays black with a play button that does nothing. I verified url and is ok, that's not the problem. In my viewController I can call this block of code multiples times with differen...
1

votes
0

answer
558

Views

How to stop AVPlayer after did Fast Forward in ios app?

Hi in my application i am launching AVPlayerViewController and while playing content i will fast forward the player after fast forward it will take sometime to start play before it start play again i will close the player.In this scenario i can able to hear audio even after close player.How to resol...
Naresh G
1

votes
1

answer
2.1k

Views

AVPlayer Controls not working properly

I've been trying to implement AVPlayer but I found some issues. First, on the demo (https://developer.xamarin.com/recipes/ios/media/video_and_photos/play_a_video_using_avplayer/) there's no controls...is this normal? Controls should be enable by default(apple documentation) On my app I override AVPl...
nhenrique
1

votes
1

answer
1.8k

Views

AVPlayerViewController in UICollectionViewCell bug?

In my UICollectionView i have a cell. This is my cellForItemAtIndexPath func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { var videoCell = collectionView.dequeueReusableCellWithReuseIdentifier('cellVideo', forIndexPath: inde...
Tore. Ini
1

votes
2

answer
554

Views

UINavigationController hides AVPlayerViewController progress slider

I'm using AVPlayerViewController with the UINavigationController like following code. AVPlayerViewController* audioPlayer = [[AVPlayerViewController alloc] init]; audioPlayer.audioFilePath = recordFilePath; [self.navigationController pushViewController:audioPlayer animated:YES]; When the AVPlayerVie...
TGT
1

votes
1

answer
523

Views

Adding Activity Indicator in view of AVPlayerViewController tvos

I am developing a Apple Tv app. Its a video app, where user selects videos from the grid and it starts playing in AVPlayerviewController, for some videos, it starts displaying the activity indicator (by default) and shows seek bar and then it starts playing. For some lengthy videos which it takes ti...
Saty
1

votes
1

answer
504

Views

Videos inside UICollectionView: scrolling issue

I have some videos shown in UICollectionView; when the app is loaded it runs fine, while when the user scrolls the UICollectionView, videos are not loaded and all the cells are grayed and never be filled with the correct video, even if in debug i see the correct mp4 url. Here is the code: func colle...
Cris
1

votes
1

answer
631

Views

An AVPlayerItem cannot be associated with more than one instance of AVPlayer error playing multiple videos

So I have searched every posting regarding this error and nothing has worked. What happens is that the first time I open the following view controller, everything works. But when I dismiss the controller and try to play the videos a second time, I get this error. Not sure why. NSMutableArray *AVPla...
Shuttor Inc
1

votes
1

answer
2k

Views

Show video in collection view cell

I want to show multiple videos in a collection view. I have this code: -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return array.count; } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(N...
Lothar
1

votes
1

answer
508

Views

AVPlayer play video multiple times(10-15) getting play icon with cross line

I'm developing ebook reader based app with PDF book consists of multiple PDF pages. Each page have video icon to play video assets. I used AVPlayer to play video using AVPlayerItem and AVURLAsset(stream from URL). Its working fine for 10-15 times of playing the same or different video from the same...
Anbu Mani
1

votes
1

answer
402

Views

Destroy Navigation bar and tab bar on specific view in swift

I have one app to play video that build with swift. I play video on view AVPlayerViewController by story board. and inside the AVPlayViewController are contain with tab bar and navigation bar that I use on previous screen. during play the Video, when I push the done on the top left it will return to...
Leang Socheat
1

votes
1

answer
2.2k

Views

iOS - Use AVPlayerViewController in AVKit obj-c

I am trying to update this deprecated method: 'presentMoviePlayerViewControllerAnimated' however I am not able to import AVKit and use AVPlayerViewContoller. It seems like my Xcode is not seeing this framework somehow. Here is my code: MatchDetailsVC.m -(void) tableView:(UITableView *)tableView didS...
Vuko
1

votes
1

answer
1.3k

Views

How to play local video in AVPlayer using an array of URL's?

I am developing a iOS app and I want to be able to play a local video file when you select a row from a table view. After a cell row is selected, it hen segues to an AVPlayerViewController where the video should be played, however after the segue is performed and the AVPlayerViewController is presen...
Marko Cain
1

votes
1

answer
1.6k

Views

Force orientation not working in iOS 10 devices

Currently i am doing force orientation change when AVPlayer fullscreen button pressed.I tried something similar final class NewMoviePlayerViewController: AVPlayerViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() if contentOverlayView?.bounds == UIScreen.main.bou...
karthikeyan
1

votes
1

answer
399

Views

AVPlayerViewController UITapGestureRecognizer not working in ios 11

I know this could be a replicate of this question AVPlayer UITapGestureRecognizer not working However, I still post it because I don't have enough reps to comment on the original answer. The question is how can I add UITapGestureRecognizer to the AVPlayerViewController. Things I've tried: let wake_o...
Rong Gong
1

votes
1

answer
1.2k

Views

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 = AVPlayerViewController() var player = AVPlayer() playerAV....
Prashant Ghimire

View additional questions