Reputation: 173
Thanks for taking your time to help others.
I would like to play LIVE content from server link, without an extension in native SwiftUI player. Server link follows this pattern:
http://****flix.com:8080/username/password/channel
I can't play an IPTV server link on SwiftUI
Simple implementation of AVPlayer with link. (Not real data as involves credentials)
import SwiftUI
import AVKit
struct ContentView: View {
let liveContentOK = URL(string: "https://ztnr.rtve.es/ztnr/1688877.m3u8")!
let liveContentNotWorking = URL(string: "http://****flix.com:8080/username/password/channel")!
var body: some View {
VideoPlayer(player: AVPlayer(url: liveContent))
}
}
#Preview {
ContentView()
}
As well, I tried on this VLC implementation, and it works with my IPTV link. BUT, the idea was to include this on a companies App so license is not valid. That's why I want to use something native, as AVPlayer.
In this repo you can find m3u8 links that currently works on AVPlayer too. But those are the easy ones, no authentication, has extension, etc.
Just in case, I also did tried to play the link appending .m3u8 and .ts extensions, with no result.
So, this link does NOT work: http://****flix.com:8080/username/password/channel
And this other link do work: https://ztnr.rtve.es/ztnr/1688877.m3u8
Differences I see?
Upvotes: 0
Views: 113