Fix Showup downloads

Add cid and pid to the playlist url, which fixes the download
functionality. But downloads now stop after a couple of minutes if you
are not logged in.
This commit is contained in:
0xb00bface 2020-09-28 14:34:11 +02:00
parent 8cac027e0a
commit e4eee063ba
1 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,10 @@ public class ShowupModel extends AbstractModel {
} }
int cdnHost = 1 + new Random().nextInt(5); int cdnHost = 1 + new Random().nextInt(5);
src.mediaPlaylistUrl = MessageFormat.format("https://cdn-e0{0}.showup.tv/h5live/http/playlist.m3u8?url=rtmp%3A%2F%2F{1}%3A1935%2Fwebrtc&stream={2}_aac", cdnHost, streamTranscoderAddr, streamId); int cid = 100_000 + new Random().nextInt(900_000);
long pid = 10_000_000_000L + new Random().nextInt();
String urlTemplate = "https://cdn-e0{0}.showup.tv/h5live/http/playlist.m3u8?url=rtmp%3A%2F%2F{1}%3A1935%2Fwebrtc&stream={2}_aac&cid={3}&pid={4}";
src.mediaPlaylistUrl = MessageFormat.format(urlTemplate, cdnHost, streamTranscoderAddr, streamId, cid, pid);
List<StreamSource> sources = new ArrayList<>(); List<StreamSource> sources = new ArrayList<>();
sources.add(src); sources.add(src);
return sources; return sources;