I have started from Unity video playback example where (on IOS) a demo video is correctly played on a texture.
Video is stored into streaming assets folder.
Everything worked fine.
Then I have tried to download a video into a local IOS folder and play it on a texture.
Unfortunately I can't use Streaming Assets folder I can't write on it.
I have found a way to download file into Application.persistentDataPath.
Then to Video Prefab path I wrote: "file://" + path.Combine(Application.persistentDataPath, filename);
(Note: without "file://" Video Prefab was not able to play downloaded video)
With "file://" + path.Combine(Application.persistentDataPath, filename)
Video correctly plays but always fullscreen.
When I log "isPlayableOnTexture" property into VideoPlaybackBehaviour class
it is false even if file is local (downloaded) while it is true for demo video
into Streaming assets folder.
I supposed that if video file was local I could be able to play it on a texture.
- Is it possible what I am trying to do?
- Or only videos that are included into app have this feature?