|
|
|
|
@ -122,7 +122,7 @@ public class Players implements Player.Listener, ParseCallback { |
|
|
|
|
private void setPlayer(PlayerView view) { |
|
|
|
|
AssHandler assHandler = new AssHandler(AssRenderType.LEGACY); |
|
|
|
|
AssSubtitleParserFactory subtitleParserFactory = new AssSubtitleParserFactory(assHandler); |
|
|
|
|
exoPlayer = new ExoPlayer.Builder(App.get()).setLoadControl(ExoUtil.buildLoadControl()).setTrackSelector(ExoUtil.buildTrackSelector()).setRenderersFactory(ExoUtil.buildRenderersFactory(isHard() ? EXTENSION_RENDERER_MODE_ON : EXTENSION_RENDERER_MODE_PREFER)).setMediaSourceFactory(ExoUtil.buildMediaSourceFactory(assHandler, subtitleParserFactory)).build(); |
|
|
|
|
exoPlayer = new ExoPlayer.Builder(App.get()).setLoadControl(ExoUtil.buildLoadControl()).setTrackSelector(ExoUtil.buildTrackSelector()).setRenderersFactory(ExoUtil.buildRenderersFactory(isHard() ? EXTENSION_RENDERER_MODE_ON : EXTENSION_RENDERER_MODE_PREFER)).setMediaSourceFactory(ExoUtil.buildMediaSourceFactory()).build(); |
|
|
|
|
exoPlayer.setAudioAttributes(AudioAttributes.DEFAULT, true); |
|
|
|
|
exoPlayer.addAnalyticsListener(new EventLogger()); |
|
|
|
|
exoPlayer.setHandleAudioBecomingNoisy(true); |
|
|
|
|
|