mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
small fixes
This commit is contained in:
parent
1aa02db53f
commit
37160bcd74
@ -66,8 +66,11 @@ class BackgroundMode {
|
|||||||
* Initializes the [playerNotification] attached to the [player] and shows it.
|
* Initializes the [playerNotification] attached to the [player] and shows it.
|
||||||
*/
|
*/
|
||||||
private fun initializePlayerNotification(c: Context) {
|
private fun initializePlayerNotification(c: Context) {
|
||||||
playerNotification = PlayerNotificationManager.Builder(c, 1, "background_mode").build()
|
playerNotification = PlayerNotificationManager
|
||||||
|
.Builder(c, 1, "background_mode").build()
|
||||||
playerNotification.setPlayer(player)
|
playerNotification.setPlayer(player)
|
||||||
|
playerNotification.setUsePreviousAction(false)
|
||||||
|
playerNotification.setUseNextAction(false)
|
||||||
playerNotification.setMediaSessionToken(mediaSession.sessionToken)
|
playerNotification.setMediaSessionToken(mediaSession.sessionToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,13 +409,13 @@ class PlayerFragment : Fragment() {
|
|||||||
|
|
||||||
private fun initializePlayerView(view: View, response: Streams) {
|
private fun initializePlayerView(view: View, response: Streams) {
|
||||||
isLoading = false
|
isLoading = false
|
||||||
var videosNameArray: Array<CharSequence> = arrayOf()
|
|
||||||
videosNameArray += "HLS"
|
|
||||||
for (vid in response.videoStreams!!) {
|
|
||||||
val name = vid.quality + " " + vid.format
|
|
||||||
videosNameArray += name
|
|
||||||
}
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
|
var videosNameArray: Array<CharSequence> = arrayOf()
|
||||||
|
videosNameArray += "HLS"
|
||||||
|
for (vid in response.videoStreams!!) {
|
||||||
|
val name = vid.quality + " " + vid.format
|
||||||
|
videosNameArray += name
|
||||||
|
}
|
||||||
var subtitle = mutableListOf<SubtitleConfiguration>()
|
var subtitle = mutableListOf<SubtitleConfiguration>()
|
||||||
if (response.subtitles!!.isNotEmpty()) {
|
if (response.subtitles!!.isNotEmpty()) {
|
||||||
subtitle.add(
|
subtitle.add(
|
||||||
@ -871,9 +871,12 @@ class PlayerFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initializePlayerNotification(c: Context) {
|
private fun initializePlayerNotification(c: Context) {
|
||||||
playerNotification = PlayerNotificationManager.Builder(c, notificationId, "background_mode")
|
playerNotification = PlayerNotificationManager
|
||||||
|
.Builder(c, notificationId, "background_mode")
|
||||||
.build()
|
.build()
|
||||||
playerNotification.setPlayer(exoPlayer)
|
playerNotification.setPlayer(exoPlayer)
|
||||||
|
playerNotification.setUseNextAction(false)
|
||||||
|
playerNotification.setUsePreviousAction(false)
|
||||||
playerNotification.setMediaSessionToken(mediaSession.sessionToken)
|
playerNotification.setMediaSessionToken(mediaSession.sessionToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user