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.android.billingclient:billing:3.0.2'
|
||||||
|
|
||||||
implementation 'com.google.code.gson:gson:2.8.6'
|
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-core:2.12.2'
|
||||||
implementation 'com.google.android.exoplayer:exoplayer-dash:2.11.4'
|
implementation 'com.google.android.exoplayer:exoplayer-dash:2.12.2'
|
||||||
implementation 'com.google.android.exoplayer:exoplayer-ui:2.11.4'
|
implementation 'com.google.android.exoplayer:exoplayer-ui:2.12.2'
|
||||||
implementation 'com.google.android.exoplayer:extension-cast:2.11.4'
|
implementation 'com.google.android.exoplayer:extension-cast:2.12.2'
|
||||||
implementation 'com.google.android.exoplayer:extension-mediasession:2.11.4'
|
implementation 'com.google.android.exoplayer:extension-mediasession:2.12.2'
|
||||||
|
|
||||||
implementation 'com.google.android:flexbox:2.0.1'
|
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.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|
|
@ -1675,6 +1675,8 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||||
|
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||||
|
|
||||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||||
MainActivity.playerCache =
|
MainActivity.playerCache =
|
||||||
new SimpleCache(context.getCacheDir(),
|
new SimpleCache(context.getCacheDir(),
|
||||||
|
|
|
@ -448,6 +448,7 @@ public class ShuffleFragment extends BaseFragment {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
MainActivity.appPlayer = new SimpleExoPlayer.Builder(context).build();
|
||||||
|
MainActivity.appPlayer.setWakeMode(C.WAKE_MODE_NETWORK);
|
||||||
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
MainActivity.appPlayer.setAudioAttributes(audioAttributes, true);
|
||||||
MainActivity.playerCache =
|
MainActivity.playerCache =
|
||||||
new SimpleCache(context.getCacheDir(),
|
new SimpleCache(context.getCacheDir(),
|
||||||
|
|
|
@ -6,9 +6,13 @@ import android.os.Handler;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
import com.google.android.exoplayer2.DefaultRenderersFactory;
|
||||||
|
import com.google.android.exoplayer2.PlaybackParameters;
|
||||||
import com.google.android.exoplayer2.Renderer;
|
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.AudioProcessor;
|
||||||
import com.google.android.exoplayer2.audio.AudioRendererEventListener;
|
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.audio.TeeAudioProcessor;
|
||||||
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
import com.google.android.exoplayer2.drm.DrmSessionManager;
|
||||||
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
import com.google.android.exoplayer2.drm.FrameworkMediaCrypto;
|
||||||
|
@ -30,22 +34,18 @@ public class ExoplayerAudioRenderer extends DefaultRenderersFactory {
|
||||||
Context context,
|
Context context,
|
||||||
int extensionRendererMode,
|
int extensionRendererMode,
|
||||||
MediaCodecSelector mediaCodecSelector,
|
MediaCodecSelector mediaCodecSelector,
|
||||||
@Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
|
|
||||||
boolean playClearSamplesWithoutKeys,
|
|
||||||
boolean enableDecoderFallback,
|
boolean enableDecoderFallback,
|
||||||
AudioProcessor[] audioProcessors,
|
AudioSink audioSink,
|
||||||
Handler eventHandler,
|
Handler eventHandler,
|
||||||
AudioRendererEventListener eventListener,
|
AudioRendererEventListener eventListener,
|
||||||
ArrayList<Renderer> out) {
|
ArrayList<Renderer> out) {
|
||||||
AudioProcessor[] audioProcessorList = { new TeeAudioProcessor(audioBufferSink) };
|
|
||||||
super.buildAudioRenderers(
|
super.buildAudioRenderers(
|
||||||
context,
|
context,
|
||||||
extensionRendererMode,
|
extensionRendererMode,
|
||||||
mediaCodecSelector,
|
mediaCodecSelector,
|
||||||
drmSessionManager,
|
|
||||||
playClearSamplesWithoutKeys,
|
|
||||||
enableDecoderFallback,
|
enableDecoderFallback,
|
||||||
audioProcessorList,
|
audioSink,
|
||||||
eventHandler,
|
eventHandler,
|
||||||
eventListener,
|
eventListener,
|
||||||
out);
|
out);
|
||||||
|
|
Loading…
Reference in a new issue