57 lines
1.4 KiB
Swift
57 lines
1.4 KiB
Swift
//
|
|
// ContentView.swift
|
|
// vrtnu
|
|
//
|
|
// Created by Jens Timmerman on 23/09/2020.
|
|
//
|
|
|
|
import SwiftUI
|
|
import AVKit
|
|
import AVFoundation
|
|
|
|
struct ContentView: View {
|
|
var body: some View {
|
|
NavigationView{
|
|
List {
|
|
ForEach(VRTNu().shows, id: \.self){ show in
|
|
Section(header: Text(show.title)){
|
|
HStack{
|
|
ForEach(show.seasons, id:\.self){ season in
|
|
HStack{
|
|
ForEach(season.episodes, id:\.self){ episode in
|
|
Text(season.seasonName)
|
|
Text(episode.name)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.navigationTitle("VRT Nu")
|
|
.listStyle(GroupedListStyle())
|
|
}
|
|
}
|
|
}
|
|
|
|
/*struct SeasonView: View{
|
|
var body: some View{
|
|
|
|
}
|
|
}*/
|
|
|
|
struct VideoView: View {
|
|
private let player = AVPlayer(url: URL(string: "https://remix-cf.lwc.vrtcdn.be/remix/ecd69313-4a39-4297-95b1-aede167725b7/remix.ism/.m3u8")!);
|
|
|
|
var body: some View {
|
|
VideoPlayer(player: player).fixedSize()
|
|
};
|
|
|
|
|
|
}
|
|
struct ContentView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
ContentView()
|
|
}
|
|
}
|