ExoPlayer improvements (#325)
* fix: add declarations for BT headsets * fix: stop overriding user settings * fix: offload cache to external storage
This commit is contained in:
parent
13a65c2bfa
commit
72c69e7c79
3 changed files with 12 additions and 3 deletions
|
@ -38,6 +38,15 @@
|
||||||
android:name="android.permission.READ_APP_SPECIFIC_LOCALES"
|
android:name="android.permission.READ_APP_SPECIFIC_LOCALES"
|
||||||
tools:ignore="ProtectedPermissions" />
|
tools:ignore="ProtectedPermissions" />
|
||||||
|
|
||||||
|
<!-- ExoPlayer: Bluetooth Headsets -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.bluetooth"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH"
|
||||||
|
android:maxSdkVersion="30"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||||
|
<!-- ExoPlayer: Bluetooth Headsets -->
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="idm.internet.download.manager.plus" />
|
<package android:name="idm.internet.download.manager.plus" />
|
||||||
<package android:name="idm.internet.download.manager" />
|
<package android:name="idm.internet.download.manager" />
|
||||||
|
|
|
@ -1825,7 +1825,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
||||||
override fun onTick(millisUntilFinished: Long) {
|
override fun onTick(millisUntilFinished: Long) {
|
||||||
if (new == null) {
|
if (new == null) {
|
||||||
skipTimeButton.visibility = View.GONE
|
skipTimeButton.visibility = View.GONE
|
||||||
exoSkip.visibility = View.VISIBLE
|
exoSkip.isVisible = PrefManager.getVal<Int>(PrefName.SkipTime) > 0
|
||||||
disappeared = false
|
disappeared = false
|
||||||
functionstarted = false
|
functionstarted = false
|
||||||
cancelTimer()
|
cancelTimer()
|
||||||
|
@ -1834,7 +1834,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
||||||
|
|
||||||
override fun onFinish() {
|
override fun onFinish() {
|
||||||
skipTimeButton.visibility = View.GONE
|
skipTimeButton.visibility = View.GONE
|
||||||
exoSkip.visibility = View.VISIBLE
|
exoSkip.isVisible = PrefManager.getVal<Int>(PrefName.SkipTime) > 0
|
||||||
disappeared = true
|
disappeared = true
|
||||||
functionstarted = false
|
functionstarted = false
|
||||||
cancelTimer()
|
cancelTimer()
|
||||||
|
|
|
@ -30,7 +30,7 @@ class NetworkHelper(
|
||||||
.callTimeout(2, TimeUnit.MINUTES)
|
.callTimeout(2, TimeUnit.MINUTES)
|
||||||
.cache(
|
.cache(
|
||||||
Cache(
|
Cache(
|
||||||
directory = File(context.cacheDir, "network_cache"),
|
directory = File(context.externalCacheDir ?: context.cacheDir, "network_cache"),
|
||||||
maxSize = 5L * 1024 * 1024, // 5 MiB
|
maxSize = 5L * 1024 * 1024, // 5 MiB
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue