fix 播放器url為空時不播放
This commit is contained in:
parent
326ced4646
commit
c015459cf1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user