@@ -28,7 +28,7 @@ struct ContentView: View {
2828 ForEach ( sampleVideos) { sampleVideo in
2929 switch videoMode {
3030 case . inline: videoListItem ( for: sampleVideo)
31- case . modal: thumbnailListItem ( for: sampleVideo)
31+ case . modal: modalListItem ( for: sampleVideo)
3232 }
3333 }
3434 }
@@ -43,8 +43,8 @@ struct ContentView: View {
4343 Toggle ( " Splash Video " , isOn: $isVideoSplashScreenEnabled)
4444 Section ( " List " ) {
4545 Picker ( " Video Mode " , selection: $videoMode) {
46- Text ( " List Videos " ) . tag ( VideoMode . modal)
47- Text ( " List Previews " ) . tag ( VideoMode . inline)
46+ Text ( " Play in a modal " ) . tag ( VideoMode . modal)
47+ Text ( " Play inside the list " ) . tag ( VideoMode . inline)
4848 }
4949 }
5050 } label: {
@@ -79,20 +79,22 @@ extension ContentView {
7979 sampleVideos = videos ?? [ ]
8080 }
8181
82- func thumbnailListItem ( for video: SampleVideo ) -> some View {
82+ func modalListItem ( for video: SampleVideo ) -> some View {
8383 Button {
8484 selection = video
8585 } label: {
8686 DemoListItem ( video: video) { video in
8787 RobustAsyncImage ( url: video. thumbnailUrl)
8888 }
8989 }
90+ . tint ( . primary)
9091 }
9192
9293 func videoListItem( for video: SampleVideo ) -> some View {
9394 DemoListItem ( video: video) { video in
9495 VideoPlayer (
9596 videoURL: video. videoUrl,
97+ time: . constant( 30.0 ) ,
9698 configuration: . list,
9799 controllerConfiguration: { controller in
98100 // Configure the underlying controller here
@@ -109,6 +111,7 @@ extension ContentView {
109111 // Configure the underlying controller here
110112 }
111113 )
114+ . ignoresSafeArea ( )
112115 }
113116}
114117
0 commit comments