diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index e68e8434b..839be869d 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -21,6 +21,7 @@ import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.video.VideoSize; import com.lzf.easyfloat.EasyFloat; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; @@ -393,7 +394,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void startUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null; @@ -421,7 +422,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void switchUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null;