新增检查录制时非直播状态停止直播录制功能

This commit is contained in:
yutou 2021-04-07 09:52:32 +08:00
parent 9de83f27aa
commit b078e5f9b5

View File

@ -256,7 +256,6 @@ public class Live implements ApplicationContextAware {
*/ */
public void decompress(byte[] data) { public void decompress(byte[] data) {
try { try {
byte[] bytes = new byte[data.length - 16]; byte[] bytes = new byte[data.length - 16];
System.arraycopy(data, 16, bytes, 0, data.length - 16); System.arraycopy(data, 16, bytes, 0, data.length - 16);
@ -275,6 +274,7 @@ public class Live implements ApplicationContextAware {
info.setPopular(popular); info.setPopular(popular);
} }
} }
checkLive();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
com.yutou.bilibili.Tools.Log.i("----------ERROR----------"); com.yutou.bilibili.Tools.Log.i("----------ERROR----------");
@ -290,6 +290,11 @@ public class Live implements ApplicationContextAware {
if (isLive && upData.getSavelive() == 1) { if (isLive && upData.getSavelive() == 1) {
SaveLive.getInstance().addLive(this); SaveLive.getInstance().addLive(this);
} }
if(!isLive&&upData.getSavelive()==1){
if(SaveLive.getInstance().checkLive(roomId)){
SaveLive.getInstance().stop(roomId);
}
}
} }