Load Video Playback from External SDCard

0 votes
asked Mar 1, 2018 by arsevenstd (200 points)
Hai, can you explain to me how to load Video Playback from external SDCard? how i set the path from sdcard? thanks for your answered.

1 Answer

0 votes
answered Oct 16, 2019 by jashanpj (210 points)
edited Oct 16, 2019 by jashanpj
Add this code to ARVideo file
public void openSDVideoFile(String path, int texid, DelayedCallbackScheduler scheduler)
{
    this.path = path;
    player.setRenderTexture(TextureId.fromInt(texid));
    player.setVideoType(VideoType.Normal);
    player.open(path, StorageType.App, scheduler, new FunctorOfVoidFromVideoStatus() {
        @Override
        public void invoke(int status) {
            setVideoStatus(status);
        }
    });
}
Then Use a file and add it ti video.openVideoFile.
File file = new File(Environment.getExternalStorageDirectory().toString() + File.separator + JashanPJ" + File.separator + "Videos/"+target.name()+".mp4");
video = new ARVideo();
Log.i("EasyAR", "File path Real video ###"+file.toString());
video.openSDVideoFile( file.toString(), video_renderers.get(0).texId(), scheduler);
current_video_renderer = video_renderers.get(0);
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...