Skip to content

Commit

Permalink
Add playback settings to TV demo app (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 authored Dec 14, 2023
1 parent aef1beb commit 2a7d91c
Show file tree
Hide file tree
Showing 21 changed files with 665 additions and 185 deletions.
4 changes: 2 additions & 2 deletions pillarbox-core-business/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
~ Copyright (c) SRG SSR. All rights reserved.
~ License information is available from the LICENSE file.
-->
<resources>
<string name="blockReason_geoBlock">Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.</string>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="blockReason_geoBlock" tools:ignore="Typos">Dieser Inhalt ist ausserhalb der Schweiz nicht verfügbar.</string>
<string name="blockReason_legal">Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.</string>
<string name="blockReason_commercial">Dieser Werbe-Inhalt ist nicht verfügbar.</string>
<string name="blockReason_ageRating18">Dieser Inhalt ist aus Gründen des Jugendschutzes nur zwischen 22:00 und 5:00 Uhr verfügbar.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import androidx.media3.session.MediaSession
import androidx.tv.material3.ExperimentalTvMaterial3Api
import androidx.tv.material3.Surface
import ch.srgssr.pillarbox.demo.shared.data.DemoItem
import ch.srgssr.pillarbox.demo.shared.di.PlayerModule
import ch.srgssr.pillarbox.demo.tv.player.compose.TvPlayerView
Expand All @@ -30,7 +28,6 @@ class PlayerActivity : ComponentActivity() {
private lateinit var player: PillarboxPlayer
private lateinit var mediaSession: MediaSession

@OptIn(ExperimentalTvMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
player = PlayerModule.provideDefaultPlayer(this)
Expand All @@ -52,9 +49,10 @@ class PlayerActivity : ComponentActivity() {

setContent {
PillarboxTheme {
Surface(modifier = Modifier.fillMaxSize()) {
TvPlayerView(player = player)
}
TvPlayerView(
player = player,
modifier = Modifier.fillMaxSize()
)
}
}
}
Expand Down
Loading

0 comments on commit 2a7d91c

Please sign in to comment.