ExoPlayer - play local mp4 file in SD card

后端 未结 8 511
囚心锁ツ
囚心锁ツ 2021-02-04 03:49

I am using the Exoplayer Demo app and want to preload a MP4 video from SD card. I have tried out the implementation from this post, but it does not work. There is no such class

8条回答
  •  感情败类
    2021-02-04 04:31

    Video playback from sd card worked with following code. My test file is in Videos directory in sdcard.

    public static final Sample[] LOCAL_VIDEOS = new Sample[] {
            new Sample("test",
                Environment.getExternalStorageDirectory()+"/Videos/test.mp4", Util.TYPE_OTHER),
    };
    

提交回复
热议问题