We custom built and app and are using and HLS stream for a livestream. Before the livestream the player will play the last recorded media (this is setup by our livestream provider). This file will play fine, however when the livestream starts it will just play the a loading bar. The only way we have found to get the livestream to play is to delete and reinstall the app. If we do that the livestream (HLS file will play). Once the livestream is over (not being served), the file (being the last streamed service) will play fine via the HLS stream. We use the same HLS stream with our Roku app and it works as expected. We have troubleshot this with our streaming provider and they they can verify that we the stream protocol is correct.
HLS livestream issue in TVOS
Curious if you are working with UIKit or SwiftUI?
I'm building a similar app using SwiftUI (for tvOS13), haven't had any issues with my HLS live stream (yet), it seems to play my offline video file (via HLS) every time I try to load it, I haven't tested with an actual live stream yet. But, I am having trouble getting more than just one video from my archive of videos hosted at Vimeo played with their HTTP Live Streaming. Once the first video plays, it won't play a different video (though the app will play the live stream HLS (which is loaded from a different view).
I'm presenting my VideoPlayerView with .sheet(isPresented: $showVideo) after a button toggles the $showVideo state var.
My VideoPlayerView is a simple:
I'm building a similar app using SwiftUI (for tvOS13), haven't had any issues with my HLS live stream (yet), it seems to play my offline video file (via HLS) every time I try to load it, I haven't tested with an actual live stream yet. But, I am having trouble getting more than just one video from my archive of videos hosted at Vimeo played with their HTTP Live Streaming. Once the first video plays, it won't play a different video (though the app will play the live stream HLS (which is loaded from a different view).
I'm presenting my VideoPlayerView with .sheet(isPresented: $showVideo) after a button toggles the $showVideo state var.
My VideoPlayerView is a simple:
Code Block swift struct VideoView: UIViewControllerRepresentable { var videoURL: URL? private var player: AVPlayer { return AVPlayer(url: videoURL!) } func makeUIViewController(context: Context) -> AVPlayerViewController { let controller = AVPlayerViewController() controller.modalPresentationStyle = .fullScreen controller.player = player controller.player?.play() return controller } func updateUIViewController(_ playerController: AVPlayerViewController, context: Context) { print("view updated") } }