Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

AVPro Video - Opening a video with absolute path on Android

Discussion in 'Assets and Asset Store' started by brockyasar, Nov 27, 2019.

  1. brockyasar

    brockyasar

    Joined:
    Jul 19, 2019
    Posts:
    10
    I am trying to play a video from device storage on Android. It is working on PC with this code.

    _mediaPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.AbsolutePathOrURL, "C:/Users/HP/Desktop/Phone Terry.mp4", true);

    For Android, These are the paths I have used so far, none of them worked yet.

    *Phone storage
    • /storage/emulated/0/Download/Phone Terry.mp4 (This one in the manual)
    • /Storage/emulated/0/Download/Phone Terry.mp4 (Capital "S" at Storage)

    *Sd Card
    • /storage/SD/Dance/Sd Terry.mp4 (In the manual)
    • /Storage/SD/Dance/Sd Terry.mp4 (With the capital "S")
    • /storage/8A50-12E7/Dance/Sd Terry.mp4 (My phone says that is the path)
    • /Storage/8A50-12E7/Dance/Sd Terry.mp4 (With the capital "S")
    I am thinking that maybe I need to give access to application for accessing files on the device. Thanks in advance!