Is there a way to download a hosted video file onto my android device within a GearVR / GoogleVR app for playback later?
Reason: rather than packaging a large video file within the application it would be ideal to download the file once the app has started. Obviously it needs to go into a folder that the UE4 media player can use for playback.
If it’s not already possible with bluerprints (and it doesn’t appear to be as all I can find is “Download Image” and “Open URL” nodes which don’t do the job) - is there a plugin or source code I could compile that could add the functionality?
Take a look in Engine\Source\Runtime\UMG\Private\Blueprint\AsyncTaskDownloadImage.cpp. It uses HttpRequest to download the URL. You can copy the way this works. HandleImageRequest() gets the result and tries to treat the result as an image to place into a texture. Just take the HttpResponse->GetContent().GetData() and write it to a file.
Once I figure out how to write it to a file how do I get the media player to play it? As per my current knowledge the android media player only plays from the content/movie folder in the packaged project. Is it possible to get it to play a file in a different location?
Use OpenUrl on the mediaplayer with “file://mypath/myfile.mp4”. If you didn’t download it to GExternalFilePath you will need to remove the checking in PathToAndroidPaths in AndroidFile.cpp for AllowLocal case.
Hi, I’m interested in having multiple Texture files downloaded on runtime and then load them into a set of materials. Currently Oculus limits .apk file sizes to 500mb for the Gear VR which makes it impossible to load large projects.
How should I go about and handle this as the only way I see to load textures is by packaging them. Thanks