2

Please help me find a way to get a video from the android internal storage during run time and play it using the video player component attached to an object, in Unity.

I want to access the video from the internal storage during run time and not from the assets.

Nand gopal
  • 346
  • 3
  • 17
  • can u tried for this ?? – Ali Feb 14 '18 at 05:36
  • Whether I've tried doing this? I tried setting the file location as the url, but, that is not working. – Nand gopal Feb 14 '18 at 06:01
  • past your tried code – Ali Feb 14 '18 at 06:03
  • Play from StreamingAssets folder. See duplicate for more information – Programmer Feb 14 '18 at 06:29
  • 1
    `vid.GetComponent().url = "file://storage/emulated/0/Video.mp4";` But i don't think we can access files outside the build like this. – Nand gopal Feb 14 '18 at 06:30
  • @Programmer : That'd only allow me to play a video within the StreamingAssets folder, right? What if i need to play it from a storage location that i can pick? – Nand gopal Feb 14 '18 at 06:56
  • @Programmer could you remove the duplicate tag, as it is not? – Nand gopal Feb 14 '18 at 07:13
  • @Programmer: I need to able to take a video from a folder in the android internal storage(Not added during build), say from sdcard/Videos and then pull it on to an object. Would that be possible? I'm new to Unity. – Nand gopal Feb 14 '18 at 10:13
  • Title says Internal Storage. SDCard is not an internal storage..... – Programmer Feb 14 '18 at 12:24
  • If this is not longer a duplicate then you need to explain why it is different – New Alexandria Feb 15 '18 at 04:41
  • I was just giving an example of a random storage location. My question is how to get a video or any file from such a location. – Nand gopal Feb 15 '18 at 04:45
  • @NewAlexandria I do not want to keep a file in streaming Assets and then use it from the phone's storage. Instead i want my game object to be able play a video picked from any location in the internal storage. – Nand gopal Feb 15 '18 at 04:48
  • Also, is the StreamingAssets folder accessible through a file explorer in android? – Nand gopal Feb 15 '18 at 04:49
  • Well, IMHO this is not a duplicate. The proposed alternative ("Using new Unity VideoPlayer and VideoClip API to play video") does not mention playing from internal storage at all. – Form Mar 06 '18 at 19:20

0 Answers0