添加了盲盒转盘抽奖功能
修改交友房中开始后,不能点击头像送礼的问题
This commit is contained in:
@@ -103,9 +103,33 @@ public class AvatarFrameView extends FrameLayout implements IAnimListener {
|
||||
} else {
|
||||
isPlaying = false;
|
||||
// playNextFromQueue(); // 播放下一项
|
||||
// 播放完成后立即清理当前资源
|
||||
clearCurrentResource();
|
||||
mainHandler.postDelayed(this::playNextFromQueue, 50);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearCurrentResource() {
|
||||
// 清理当前播放的文件引用
|
||||
// mFile = null;
|
||||
|
||||
// 清理SVGA资源
|
||||
if (svgaSurface != null) {
|
||||
svgaSurface.stopAnimation();
|
||||
svgaSurface.clearAnimation();
|
||||
svgaSurface.setImageDrawable(null);
|
||||
}
|
||||
|
||||
// 清理MP4资源
|
||||
if (exoPlayer != null) {
|
||||
exoPlayer.stop();
|
||||
exoPlayer.clearVideoSurface();
|
||||
}
|
||||
|
||||
if (mBinding != null && mBinding.playView != null) {
|
||||
mBinding.playView.stopPlay();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onVideoDestroy() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user