1
我使用以下FrameWorkSampleSource
构造函数初始化SampleSource
实例。如何使用Exoplayer播放输入流?
File file = new File(path);
FileInputStream inputStream = new FileInputStream(file);
FileDescriptor fd = inputStream.getFD();
SampleSource sampleSource = new FrameworkSampleSource(fd, 0, file.length());
但我需要使用ExoPlayer播放InputStream
。我无法找到实现SampleSource
类的任何接口,并将InputStream
作为其构造函数中的参数。
我已经通过创建自己的InputStream实现它! https://github.com/amanmj/InputStream_Player –