Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Mar 14, 2019
1 parent ed2e5ff commit 25d7e8b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.util.AttributeSet;
import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
Expand All @@ -14,6 +15,7 @@
import com.shuyu.gsyvideoplayer.GSYVideoBaseManager;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener;
import com.shuyu.gsyvideoplayer.utils.Debuger;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer;
import com.shuyu.gsyvideoplayer.video.base.GSYVideoPlayer;
Expand Down Expand Up @@ -228,6 +230,9 @@ public void onSeekComplete() {
GSYVideoManager.changeManager(mTmpManager);
mTmpManager.setLastListener(manager.lastListener());
mTmpManager.setListener(manager.listener());

Debuger.printfError("**** showDisplay onSeekComplete ***** " + mSurface);
Debuger.printfError("**** showDisplay onSeekComplete isValid***** " + mSurface.isValid());
mTmpManager.setDisplay(mSurface);
changeUiToPlayingClear();
resolveChangedResult();
Expand Down Expand Up @@ -341,4 +346,13 @@ private void hideLoading() {
}
}

@Override
public boolean onSurfaceDestroyed(Surface surface) {
//清空释放
setDisplay(null);
//同一消息队列中去release
//todo 需要处理为什么全屏时全屏的surface会被释放了
//releaseSurface(surface);
return true;
}
}

0 comments on commit 25d7e8b

Please sign in to comment.