[Change]
1、升级ZeGo直播SDK
2、修复直播拉流播放状态,
/**
* 连接失败,播放失败,都走这里,可以展示播失败信息
*
* @param errorMsg
*/
void onError(String errorMsg);
/**
* 拉流成功且处于播放中
*/
void onPlaying();
/**
* 拉流重试中,还没成功,可以做Loading
*/
void onPlaRequesting();
This commit is contained in:
@@ -20,7 +20,7 @@ import com.mogo.cloud.wifi.WifiStateManager;
|
||||
|
||||
|
||||
public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLiveCallBack, IWifiStateListener {
|
||||
private String TAG = "LiveActivity";
|
||||
private String TAG = "LivePlayActivity";
|
||||
private TextView tvWifiState;
|
||||
|
||||
private SurfaceView surfaceView0;
|
||||
@@ -206,9 +206,19 @@ public class LivePlayActivity extends AppCompatActivity implements ITrafficCarLi
|
||||
Log.w(TAG, "失去连接 onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaying() {
|
||||
Log.i(TAG, "拉流状态:拉流成功,播放中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaRequesting() {
|
||||
Log.i(TAG, "拉流状态:拉流还没成功,努力加载中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Log.e(TAG, "发生错误 onError msg: " + errorMsg);
|
||||
Log.d(TAG, "拉流状态:发生错误 onError msg: " + errorMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.cloud.live.listener.ILiveStatusListener;
|
||||
import com.mogo.cloud.live.listener.ILivePushStatusListener;
|
||||
import com.mogo.cloud.live.manager.LiveStreamManagerImpl;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.trafficlive.api.ITrafficCarLiveCallBack;
|
||||
@@ -34,7 +34,7 @@ public class LivePlayAndPushActivity extends BaseLiveActivity
|
||||
MoGoAiCloudClientConfig.getInstance().getSn(),true);
|
||||
|
||||
// 设置状态回调
|
||||
liveStreamManager.setLiveStatusChangeCallback(new ILiveStatusListener() {
|
||||
liveStreamManager.setLivePushStatusChangeCallback(new ILivePushStatusListener() {
|
||||
@Override
|
||||
public void onChange(int status) {
|
||||
tvLiveStatus.post(new Runnable() {
|
||||
@@ -135,9 +135,19 @@ public class LivePlayAndPushActivity extends BaseLiveActivity
|
||||
Log.d(TAG, "失去连接 onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaying() {
|
||||
Log.i(TAG, "拉流状态:拉流成功,播放中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaRequesting() {
|
||||
Log.i(TAG, "拉流状态:拉流还没成功,努力加载中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Log.d(TAG, "发生错误 onError msg: " + errorMsg);
|
||||
Log.d(TAG, "拉流状态:发生错误 onError msg: " + errorMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mogo.cloud.wifi.WifiStateManager;
|
||||
* @author mogoauto
|
||||
*/
|
||||
public class LivePlayOneActivity extends AppCompatActivity implements ITrafficCarLiveCallBack, IWifiStateListener {
|
||||
private String TAG = "LiveActivity";
|
||||
private String TAG = "LivePlayOneActivity";
|
||||
private TextView tvWifiState;
|
||||
|
||||
private SurfaceView surfaceView;
|
||||
@@ -84,9 +84,19 @@ public class LivePlayOneActivity extends AppCompatActivity implements ITrafficCa
|
||||
Log.w(TAG, "失去连接 onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaying() {
|
||||
Log.i(TAG, "拉流状态:拉流成功,播放中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaRequesting() {
|
||||
Log.i(TAG, "拉流状态:拉流还没成功,努力加载中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Log.e(TAG, "发生错误 onError msg: " + errorMsg);
|
||||
Log.d(TAG, "拉流状态:发生错误 onError msg: " + errorMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.cloud;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.live.listener.ILiveStatusListener;
|
||||
import com.mogo.cloud.live.listener.ILivePushStatusListener;
|
||||
import com.mogo.cloud.live.manager.ILiveStreamManager;
|
||||
import com.mogo.cloud.live.manager.LiveStreamManagerImpl;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -25,7 +25,7 @@ public class LivePushActivity extends BaseLiveActivity {
|
||||
MoGoAiCloudClientConfig.getInstance().getSn(), true);
|
||||
|
||||
// 设置状态回调
|
||||
liveStreamManager.setLiveStatusChangeCallback(new ILiveStatusListener() {
|
||||
liveStreamManager.setLivePushStatusChangeCallback(new ILivePushStatusListener() {
|
||||
@Override
|
||||
public void onChange(int status) {
|
||||
tvLiveStatus.post(new Runnable() {
|
||||
|
||||
@@ -200,9 +200,19 @@ public class MainActivity extends AppCompatActivity {
|
||||
Log.e(TAG, "onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaying() {
|
||||
Log.i(TAG, "拉流状态:拉流成功,播放中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlaRequesting() {
|
||||
Log.i(TAG, "拉流状态:拉流还没成功,努力加载中 …………");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Log.e(TAG, "errorMsg");
|
||||
Log.d(TAG, "拉流状态:发生错误 onError msg: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user