How to make an AVPlayerViewController going full screen by program?
source link: https://www.codesd.com/item/how-to-make-an-avplayerviewcontroller-going-full-screen-by-program.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to make an AVPlayerViewController going full screen by program?
I'm trying to make a AVPlayerViewController go to full screen mode programmatically, coming from "embedded" mode, however this does not appear to be possible with the published API.
Is there a workaround that I'm missing? I'm interested in obtaining the same animation to the one that you get when the user presses the full screen button on the bottom right of the controls.
Using MPMoviePlayerController is not a viable alternative since I might have more than one video playing at a time.
Thanks.
AVPlayerViewController is a subclass of UIViewController, so it is presentable like any other view controller subclass. Are you able to use presentViewController:animated:completion
?
self.avPlayerController.modalPresentationStyle = UIModalPresentationOverFullScreen;
[self presentViewController:self.avPlayerController animated:YES completion:nil];
This then shows the "Done" button in the top left-hand corner.
Related Articles
How to make the flash object full screen in HTML?
How to make uiview viewcontroller in full screen using ios7 custom transitions
How to make a video in full screen when it is placed inside an iframe?
How to make a video in full screen using ActionScript in a flexible desktop application
How to play a video in full screen mode and exit full screen mode in Android WebView?
How do you prevent a javascript redirect from going full screen?
Rotate UIView with CGAffineTransform - how to make it run at full speed and not short?
How to display the application in full screen mode, covering the Start menu?
How do I switch to & ldquo; Full-screen view & rdquo; In flash created Ming php
Make fragments in full screen by program
How to open a window in full screen mode on the button Click on IE8
How to make a rectangle on the screen invisible for screenshot?
How to prevent this opening in full screen and Add a scroll bar in Firefox
iOS 8 - change orientation to portrait when exiting AVPlayerViewController in full screen
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK