ExoPlayer cache

前端 未结 3 1370
孤独总比滥情好
孤独总比滥情好 2020-12-28 18:22

I\'m traying to use ExoPlayer for playback video over http. And I want to save video after video was loaded and play it from cache. How Do implement cache and playback from

3条回答
  •  攒了一身酷
    2020-12-28 19:03

    What protocol are you using mpeg-dash or plain http.

    You can override HttpDataSource and write incoming bytes to a file and when playing again check if file exists at the desired location and change the InputStream fed to the player from your file instead of HttpDataSource.

提交回复
热议问题