This appears to be an Apple bug in iPadOS 14.4 - I was able to reproduce the problem in a pure Obj-C app with no JUCE code.
If you disable the app’s status bar by overriding your ViewController’s
prefersStatusBarHidden property to
YES, then add a subview to the root view which contains an
AVPlayer, then the root view will disappear (but strangely only when the native transport controls of the player fade out).
@interface ViewController : UIViewController
@interface ViewController ()
- (BOOL) prefersStatusBarHidden
- (void) viewDidLoad
CGRect r = CGRectMake (0, 0, 500, 500);
UIView* v = [[UIView alloc] initWithFrame: r];
[v setBackgroundColor: [UIColor redColor]];
playerViewController = [AVPlayerViewController new];
NSURL* videoURL = [NSURL URLWithString: @"https://www.rmp-streaming.com/media/bbb-360p.mp4"];
AVPlayer* player = [AVPlayer playerWithURL: videoURL];
playerViewController.player = player;
[v addSubview: [playerViewController view]];
[[playerViewController view] setFrame: CGRectMake (200, 200, 200, 200)];
[self setView: v];
I’ve submitted a bug report to Apple, but in the meantime you can work around this by enabling the status bar in your app by setting
NO in the app’s .plist.