Merge pull request #1115 from pakar/master
Upgrade ExoPlayer from 2.11.4 to 2.12.2
This commit is contained in:
commit
28212808f8
5 changed files with 16 additions and 12 deletions
|
@ -104,11 +104,11 @@ dependencies {
|
|||
implementation 'com.android.billingclient:billing:3.0.2'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.11.4'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-core:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:extension-cast:2.12.2'
|
||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.12.2'
|
||||
|
||||
implementation 'com.google.android:flexbox:2.0.1'
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
|
|
@ -1675,6 +1675,8 @@ public class FileViewFragment extends BaseFragment implements
|
|||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||
|
||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||
MainActivity.playerCache =
|
||||
new SimpleCache(context.getCacheDir(),
|
||||
|
|
|
@ -448,6 +448,7 @@ public class ShuffleFragment extends BaseFragment {
|
|||
.build();
|
||||
|
||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||
MainActivity.playerCache =
|
||||
new SimpleCache(context.getCacheDir(),
|
||||
|
|
|
@ -6,9 +6,13 @@ import android.os.Handler;
|
|||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||
import com.google.android.exoplayer2.PlaybackParameters;
|
||||
import com.google.android.exoplayer2.Renderer;
|
||||
import com.google.android.exoplayer2.audio.AudioCapabilities;
|
||||
import com.google.android.exoplayer2.audio.AudioProcessor;
|
||||
import com.google.android.exoplayer2.audio.AudioRendererEventListener;
|
||||
import com.google.android.exoplayer2.audio.AudioSink;
|
||||
import com.google.android.exoplayer2.audio.DefaultAudioSink;
|
||||
import com.google.android.exoplayer2.audio.TeeAudioProcessor;
|
||||
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
||||
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
||||
|
@ -30,22 +34,18 @@ public class ExoplayerAudioRenderer extends DefaultRenderersFactory {
|
|||
Context context,
|
||||
int extensionRendererMode,
|
||||
MediaCodecSelector mediaCodecSelector,
|
||||
@Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
|
||||
boolean playClearSamplesWithoutKeys,
|
||||
boolean enableDecoderFallback,
|
||||
AudioProcessor[] audioProcessors,
|
||||
AudioSink audioSink,
|
||||
Handler eventHandler,
|
||||
AudioRendererEventListener eventListener,
|
||||
ArrayList<Renderer> out) {
|
||||
AudioProcessor[] audioProcessorList = { new TeeAudioProcessor(audioBufferSink) };
|
||||
|
||||
super.buildAudioRenderers(
|
||||
context,
|
||||
extensionRendererMode,
|
||||
mediaCodecSelector,
|
||||
drmSessionManager,
|
||||
playClearSamplesWithoutKeys,
|
||||
enableDecoderFallback,
|
||||
audioProcessorList,
|
||||
audioSink,
|
||||
eventHandler,
|
||||
eventListener,
|
||||
out);
|
||||
|
|
Loading…
Reference in a new issue