This commit is contained in:
zhongchao
2021-02-07 14:44:59 +08:00
5 changed files with 2 additions and 58 deletions

1
.idea/gradle.xml generated
View File

@@ -26,7 +26,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -17,7 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入要查看的车机SN"
android:text="F803EB2046PZD00273"
android:text="X1020210128F803EB2046PZD00149"
android:textColor="#FFFF"
app:layout_constraintBottom_toTopOf="@+id/liveToggleBtn"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -1,10 +0,0 @@
package com.mogo.cloud.live.listener;
import com.mogo.cloud.live.socket.IotMessageType;
/**
* 常连接消息回调用
*/
public interface BizMessageListener {
void onMessageReceived(IotMessageType type, String content);
}

View File

@@ -1,46 +0,0 @@
package com.mogo.cloud.live.socket;
public enum IotMessageType {
//Push 推流消息
MSG_LIVE_PUSH_STATUS(0),
//Cancel car alarm 消息
MSG_CANCEL_CAR_ALARM(1),
//单个文件上传
MSG_UPLOAD_SINGLE_FILE(2),
//切换摄像头
MSG_SWITCH_CAMERA(3),
//组文件上传
MSG_UPLOAD_MULTI_FILE(4),
//抓拍图片上传
MSG_UPLOAD_CAPTURE_PIC(5),
//未知消息
UNKNOWN(-1),
;
private int type;
private IotMessageType(int type) {
this.type = type;
}
public int getType() {
return type;
}
public static IotMessageType getMsgType(int type){
final IotMessageType[] messageTypes = IotMessageType.values();
for(IotMessageType messageType : messageTypes){
if (messageType.getType() == type){
return messageType;
}
}
return UNKNOWN;
}
}

View File

@@ -65,6 +65,7 @@ public class TrafficLiveManager implements ILiveProgressListener {
requestLiveManager.requestVehicleHeadLive(LIVE_TYPE_OPEN, liveSn, new IRequestLiveListener() {
@Override
public void onSuccess() {
Logger.i(TAG, "主播开始直播了");
String sn = MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn();
mStreamId = MoGoLiveManager.STREAM_ID_PREFIX + liveSn;
MoGoLiveManager.getInstance().init(application, null);