- Home /
Playing a Fullscreen Video turns iOS status bar on
Hi, I'm using the following code : Handheld.PlayFullScreenMovie("movie.mov", Color.black, FullScreenMovieControlMode.Minimal);
When the movie stops playback, I end up having the iOS status bar on, while it was set to off initially.
Is this the expected behaviour ?
To be more accurate, this is when while playing the video you click on the bottom right arrows icon of the media player. It turns the status bar on, and stops the playback.
Answer by robot-ink · Aug 29, 2013 at 03:42 AM
You'll have to manually hide the status bar again. Here is how I do it:
obj-c code, place this in your plugins/iOS folder and name it HideStatusBar.mm
extern "C" {
void _HideStatusBar()
{
[[UIApplication sharedApplication] setStatusBarHidden:YES];
}
}
Then in Unity use this code right after you return from your fullscreen movie:
[DllImport ("__Internal")]
private static extern void _HideStatusBar ();
public static void HideStatusBar ()
{
if (Application.platform != RuntimePlatform.OSXEditor)
_HideStatusBar ();
}
Note: Status bar code has changed in iOS7 so this code won't work
Your answer
Follow this Question
Related Questions
Playing from a specific point using Handheld.PlayFullScreenMovie 0 Answers
Android translucent status bar 1 Answer
scrubbing through movie 0 Answers
iOS background audio getting muted 1 Answer
Android video playback 2 Answers