forked from j62/ctbrec
1
0
Fork 0

Fix CamSoda recordings

This commit is contained in:
0xb00bface 2020-07-18 12:48:00 +02:00
parent e202c946ac
commit c50519be82
1 changed files with 5 additions and 1 deletions

View File

@ -158,8 +158,12 @@ public class CamsodaModel extends AbstractModel {
if (oldStreamUrl && chat.has(EDGE_SERVERS)) { if (oldStreamUrl && chat.has(EDGE_SERVERS)) {
String edgeServer = chat.getJSONArray(EDGE_SERVERS).getString(0); String edgeServer = chat.getJSONArray(EDGE_SERVERS).getString(0);
String streamName = chat.getString(STREAM_NAME); String streamName = chat.getString(STREAM_NAME);
if(streamName.contains("/")) {
streamUrl = "https://" + edgeServer + "/" + streamName + "/index.m3u8";
} else {
streamUrl = "https://" + edgeServer + "/cam/mp4:" + streamName + "_h264_aac_480p/playlist.m3u8"; streamUrl = "https://" + edgeServer + "/cam/mp4:" + streamName + "_h264_aac_480p/playlist.m3u8";
} }
}
setOnlineStateByStatus(status); setOnlineStateByStatus(status);
} else { } else {
throw new IOException("Result was not ok"); throw new IOException("Result was not ok");