1、升级ZeGo直播SDK
2、修复直播拉流播放状态,

    /**
     * 连接失败,播放失败,都走这里,可以展示播失败信息
     *
     * @param errorMsg
     */
    void onError(String errorMsg);

    /**
     * 拉流成功且处于播放中
     */
    void onPlaying();

    /**
     * 拉流重试中,还没成功,可以做Loading
     */
    void onPlaRequesting();
This commit is contained in:
donghongyu
2023-04-12 21:05:14 +08:00
parent a2777bb514
commit 2ad446c7b1
24 changed files with 265 additions and 119 deletions

View File

@@ -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