我注意到的唯一区别是,如果我在调用play()
之前调用prepare()
,我将会看到进度指示器,并且它会在PlayerView
中预加载数据,除此之外,如果我只是调用play()
而没有调用prepare()
,我无法感知到任何区别。
另外文档上没有提到任何内容:https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/SimpleExoPlayer.html
public void prepare()
Description copied from interface: Player
Prepares the player. //<- ???
Specified by:
prepare in interface Player
play()
之前调用它有什么好处? - undefined