- Home /
Handheld.PlayFullScreenMovie memory leak?
I'm developing a virtual classroom app for Android in Unity that allows children to walk through a 3D representation of their classroom with a touch-controlled FirstPersonController and watch instruction videos for subjects that they don't understand.
When they pick a video from one of the pop-up menus, it calls this piece of code. (Edited to a generic placeholder video for this.)
public void PlayGoat()
{
Handheld.PlayFullScreenMovie("https://dl.dropboxusercontent.com/s/tm1fsh7rselv5vd/Taylor%20Swift%20-%20Trouble%20Goat%20Remix.mp4", Color.black, FullScreenMovieControlMode.Minimal);
}
Really rather simple.
After any video plays (both when streamed from URL and loaded from StreamingAssets), the app starts to lag tremendously and eventually freezes after an x number of seconds. (It automatically closes the app after having been frozen for a few seconds.)
On the tablet type I'm developing this for, Samsung Galaxy Tab4 10.1, it freezes after about 40 seconds. On my phone, which has double the RAM, it takes considerably longer -- about 1:30 to 2 minutes -- to freeze. This makes me suspect there is a memory leak in the Handheld.PlayFullScreenMovie function that fills up the entire device's RAM before crashing it.
Does anyone have any experience with this, or any pointers on what to try?
I'd be fine with trying another way to play the videos, but it has to be capable of streaming from a URL.
My Unity version is 5.4.0f3.
I'm going to run a few more tests on this, checking the memory usage with a command every (few) update(s) tomorrow.
Hello,
I work on the same version of Unity, with a high similar Device, and I have the same issue ! ^^ Do you find any solution for this problem ?
Thank you !
Your answer
Follow this Question
Related Questions
Android MP4 Video Playback 2 Answers
onControllerHide() crash 0 Answers
How to display a video behind gui on mobile 2 Answers
Record a video in unity on mobile (Android, IOS) 1 Answer
Button as a child of a button 0 Answers