调整进直播间loading界面与播放器绑定,播放器准备完成后再隐藏。
优化播放器加载速度1
This commit is contained in:
@@ -106,7 +106,7 @@ public class LiveExoPlayerManager {
|
||||
Log.i(TAG, "onPlaybackStateChanged 1: " + playbackState);
|
||||
if (playbackState == Player.STATE_READY) {
|
||||
player2.stop();
|
||||
player2.setVideoSurface(null);
|
||||
player2.clearVideoSurface();
|
||||
player1.play();
|
||||
Log.i(TAG, "切换播放器1");
|
||||
handler.removeCallbacks(buffRunnable);
|
||||
@@ -159,7 +159,7 @@ public class LiveExoPlayerManager {
|
||||
Log.i(TAG, "onPlaybackStateChanged 2: " + playbackState);
|
||||
if (playbackState == Player.STATE_READY) {
|
||||
player1.stop();
|
||||
player1.setVideoSurface(null);
|
||||
player1.clearVideoSurface();
|
||||
player2.play();
|
||||
Log.i(TAG, "切换播放器2 " + player2.isPlaying());
|
||||
handler.removeCallbacks(buffRunnable);
|
||||
|
||||
Reference in New Issue
Block a user