mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
implement audio tracks backend
This commit is contained in:
parent
f86ca78ea5
commit
d0ef111c2d
@ -17,5 +17,7 @@ data class PipedStream(
|
||||
var indexEnd: Int? = null,
|
||||
var width: Int? = null,
|
||||
var height: Int? = null,
|
||||
var fps: Int? = null
|
||||
var fps: Int? = null,
|
||||
val audioTrackName: String? = null,
|
||||
val audioTrackId: String? = null
|
||||
)
|
||||
|
@ -1407,6 +1407,10 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
.show(childFragmentManager)
|
||||
}
|
||||
|
||||
override fun onAudioStreamClicked() {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode)
|
||||
if (isInPictureInPictureMode) {
|
||||
|
@ -4,4 +4,6 @@ interface OnlinePlayerOptions {
|
||||
fun onCaptionsClicked()
|
||||
|
||||
fun onQualityClicked()
|
||||
|
||||
fun onAudioStreamClicked()
|
||||
}
|
||||
|
@ -195,6 +195,14 @@ internal class CustomExoPlayerView(
|
||||
playerOptionsInterface?.onQualityClicked()
|
||||
}
|
||||
)
|
||||
items.add(
|
||||
BottomSheetItem(
|
||||
context.getString(R.string.audio_track),
|
||||
R.drawable.ic_audio,
|
||||
) {
|
||||
playerOptionsInterface?.onAudioStreamClicked()
|
||||
}
|
||||
)
|
||||
items.add(
|
||||
BottomSheetItem(
|
||||
context.getString(R.string.captions),
|
||||
|
10
app/src/main/res/drawable/ic_audio.xml
Normal file
10
app/src/main/res/drawable/ic_audio.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,3v9.28c-0.47,-0.17 -0.97,-0.28 -1.5,-0.28C8.01,12 6,14.01 6,16.5S8.01,21 10.5,21c2.31,0 4.2,-1.75 4.45,-4H15V6h4V3h-7z" />
|
||||
</vector>
|
@ -370,6 +370,7 @@
|
||||
<string name="layout">Layout</string>
|
||||
<string name="alternative_player_layout">Alternative player layout</string>
|
||||
<string name="alternative_player_layout_summary">Show the related videos as a row above the comments instead of below.</string>
|
||||
<string name="audio_track">Audio track</string>
|
||||
|
||||
<!-- Notification channel strings -->
|
||||
<string name="download_channel_name">Download Service</string>
|
||||
|
Loading…
Reference in New Issue
Block a user