请帮帮我,以下代码无效:
// 1. Instantiate the player.
mPlayer = ExoPlayer.Factory.newInstance(1);
// 2. Construct renderer.
Allocator allocator = new DefaultAllocator(1024);
DataSource dataSource = new DefaultUriDataSource(self, null, "userAgent");
ExtractorSampleSource sampleSource = new ExtractorSampleSource(Uri.parse(mSongObj.getUrl()), dataSource, allocator, 1 * 1024);
MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource);
// 3. Inject the renderer through prepare.
mPlayer.prepare(audioRenderer);
// 4. Start playback.
mPlayer.setPlayWhenReady(true);
// Don’t forget to release when done!
mPlayer.release();
非常感谢