修复:
直播间滑动导致画面卡顿问题
This commit is contained in:
parent
afc60eddfc
commit
e181fbf0d2
@ -257,7 +257,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//获取直播间状态
|
||||||
private Runnable liveRunnable = new Runnable() {
|
private Runnable liveRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -83,7 +83,6 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
|
|
||||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||||
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
|
||||||
@ -166,6 +165,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
private int liveBg = -1;
|
private int liveBg = -1;
|
||||||
private LiveImDeletUtil liveImDeletUtil;
|
private LiveImDeletUtil liveImDeletUtil;
|
||||||
private List<String> greetings = new ArrayList<>();
|
private List<String> greetings = new ArrayList<>();
|
||||||
|
private Handler liveHandler = new Handler();
|
||||||
|
|
||||||
|
|
||||||
public PortraitLiveManager(Activity context, Intent intent) {
|
public PortraitLiveManager(Activity context, Intent intent) {
|
||||||
@ -275,8 +275,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRemove() {
|
public void onRemove() {
|
||||||
endPlay();
|
//子线程执行退出操作
|
||||||
Executors.newCachedThreadPool().execute(() -> end());
|
liveHandler.post(() -> exitLiveRoom());
|
||||||
|
|
||||||
|
|
||||||
if (mLiveAudienceViewHolder != null) {
|
if (mLiveAudienceViewHolder != null) {
|
||||||
mLiveAudienceViewHolder.removeFromParent();
|
mLiveAudienceViewHolder.removeFromParent();
|
||||||
mLiveAudienceViewHolder.countDownTimerTrickery = null;
|
mLiveAudienceViewHolder.countDownTimerTrickery = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user