草庐IT

ByteArrayDataSource

全部标签

android - Exoplayer 从字节数组播放音频 - ByteArrayDataSource

我正在尝试使用Exoplayer从字节数组播放音频文件。我正在尝试使用ByteArrayDataSource,但在调用构造函数时遇到错误:newByteArrayDataSource(data);这是我想出的代码:privatevoidprepareExoPlayerFromByteArray(byte[]data){exoPlayer=ExoPlayerFactory.newSimpleInstance(this,newDefaultTrackSelector(null),newDefaultLoadControl());exoPlayer.addListener(eventList