ExoPlayer - play local mp4 file in SD card

后端 未结 8 504
囚心锁ツ
囚心锁ツ 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:44

    For those looking to load from the assets folder:

    assets/xyz.mp4

    it works by loading the file with:

    "file:/android_asset/xyz.mp4"

    and using the DefaultDataSourceFactory. Checked on exoplayer 2.4.4.

提交回复
热议问题