71

How to make an AVPlayerViewController going full screen by program?

 2 years ago
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.
neoserver,ios ssh client

How to make an AVPlayerViewController going full screen by program?

advertisements

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 can I make a flashobject to display in fullscreen in HTML? (without having the flash source)You can't do this from outside of Flash. Fullscreen mode is triggered by setting the fullScreen property of stage: stage.displayState = "fullScreen";

How to make uiview viewcontroller in full screen using ios7 custom transitions

What i want to achieve is: after tapping a small view with some data i want to make it full screen and possibly make it to be a new vc. For now I animate uiview to full screen with great success, but whole logic of this view is in it's "parent".

How to make a video in full screen when it is placed inside an iframe?

I'm using the default settings for my mediaelement.js player, and my initialization is very basic: $('video').mediaelementplayer(); My question is: Is it possible to fullscreen the player when the video is embedded in an iframe? When I press fullscre

How to make a video in full screen using ActionScript in a flexible desktop application

I am playing a flv video using the videoplayer class of flex. (all the properties of it are being set at runtime) I want to make the video fullscreen without clicking on the fullscreen button i.e. through programming. Is it possible. If yes then how

How to play a video in full screen mode and exit full screen mode in Android WebView?

I know this is an old question and it was asked many times. But I tried many solutions they don't work with me. I tested it in my Huawei 6P and Samsung S7, Nexus 5, the video(https://www.youtube-nocookie.com/embed/M68lNfqmTNk?rel=0&rel=0&showinfo=

How do you prevent a javascript redirect from going full screen?

I am trying to redirect to a new url using javascript within an already fullscreen mode but the redirect currenlt exits fullscreen mode which I dont want. Am I using the wrong JS code? window.location.href = demo_url; or window.location = demo_url; I

Rotate UIView with CGAffineTransform - how to make it run at full speed and not short?

I'm making a speedometer app and I want arrow to behave the correct way - if I launch from zero to 200 km in one second, I want it to go around the bar, but if I set my rotation angle big enough, it goes the short way, from the bottom. How do I make

How to display the application in full screen mode, covering the Start menu?

I'm developing an application for Honeywell Dolphin 6100, a mobile computer with a barcode scanner that uses Windows CE 5.0 like OS. The problem is that I can not put the application into full screen (the start menu below the screen insist to be appe

How do I switch to & ldquo; Full-screen view & rdquo; In flash created Ming php

my facebook application is posting an SWF on user wall the SWF is created in PHP with Ming (good decision?) I want to make a button that switch the view to full screen mode, do you know how I can do it?Can't mark this as dupe because of the bounty, s

Make fragments in full screen by program

I have a ViewPager and FragmentPagerAdapter set up in one activity with 3 fragments. All fragments are loaded simultaneously and are kept in memory using mPager.setOffscreenPageLimit(2); One of these fragments hosts a camera preview that I would like

How to open a window in full screen mode on the button Click on IE8

I have applied a jquery function in my MVC code for showing my current window in Full Screen Mode on button click. Here is the jquery for it :- function FullScreen() { if ((document.fullScreenElement && document.fullScreenElement !== null) || // a

How to make a rectangle on the screen invisible for screenshot?

How can I create a rectangle on the screen that is invisible to any sort of screen capture(printscreen or aplications) ? By create a rectangle on screen I mean something like this: #include <Windows.h> #include <iostream> void drawRect(){ HDC

How to prevent this opening in full screen and Add a scroll bar in Firefox

Hi I just want to ask how can i make this pop up not in full screen and with Scroll bar this line of code <a href="/Hire/HireDetails?Id=' + ID + '" onclick="window.open(this.href,height=850,width=1200);return false""><spa

iOS 8 - change orientation to portrait when exiting AVPlayerViewController in full screen

my app is a portrait only app, but I have one view controller which is displaying a live stream, using an AVPlayerViewController. To allow landscape for the full screen view of that player I wrote this method in the AppDelegate.swift: func applicatio

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK