Play streams at the live position
I’m trying to hand VLC a TV stream to play (an HLS M3U8 playlist). The stream has quite a long "scrollback" of about two hours, and when the stream starts to play, it initially plays from the live position, but in about ten seconds flips to some random position which I suspect to be the "two hours ago" start of the stream. The stream plays correctly if I use a Chromecast and tell it to play "live" (by not giving it a position).
This is the code I use:
val vlcIntent = Intent(Intent.ACTION_VIEW).apply {
setPackage("org.videolan.vlc")
setDataAndTypeAndNormalize(uri, "video/*")
putExtra("title", extras?.getString("title") ?: "")
}
startActivity(vlcIntent)
I found an intent extra PLAY_EXTRA_START_TIME = "position"
but I’m not sure how it works — it doesn’t seem to me that I can use it to tell VLC to stick to the end of the stream.
To this issue is either about figuring this out and documenting it, or implementing a fix in the code to enable playing live streams without users having to fast-forward manually.