|
@@ -1354,11 +1354,19 @@ class VideoDeviceInfoDTO {
|
|
|
|
|
|
class JoinDeviceLiveRoomResult extends TokenRequest{
|
|
|
int roomNo;
|
|
|
+ String? deviceCode;
|
|
|
+ bool mergedChannel;
|
|
|
+ int mergedVideoOutputWidth;
|
|
|
+ int mergedVideoOutputHeight;
|
|
|
List<VideoDeviceInfoDTO >? videoDeviceInfos;
|
|
|
int reportStateIntervalSeconds;
|
|
|
|
|
|
JoinDeviceLiveRoomResult({
|
|
|
this.roomNo = 0,
|
|
|
+ this.deviceCode,
|
|
|
+ this.mergedChannel = false,
|
|
|
+ this.mergedVideoOutputWidth = 0,
|
|
|
+ this.mergedVideoOutputHeight = 0,
|
|
|
this.videoDeviceInfos,
|
|
|
this.reportStateIntervalSeconds = 0,
|
|
|
String? token,
|
|
@@ -1369,6 +1377,10 @@ class JoinDeviceLiveRoomResult extends TokenRequest{
|
|
|
factory JoinDeviceLiveRoomResult.fromJson(Map<String, dynamic> map) {
|
|
|
return JoinDeviceLiveRoomResult(
|
|
|
roomNo: map['RoomNo'],
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ mergedChannel: map['MergedChannel'],
|
|
|
+ mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
|
|
|
+ mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
|
|
|
videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
reportStateIntervalSeconds: map['ReportStateIntervalSeconds'],
|
|
|
token: map['Token'],
|
|
@@ -1378,6 +1390,11 @@ class JoinDeviceLiveRoomResult extends TokenRequest{
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
map['RoomNo'] = roomNo;
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ map['MergedChannel'] = mergedChannel;
|
|
|
+ map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
|
|
|
+ map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
|
|
|
if(videoDeviceInfos != null)
|
|
|
map['VideoDeviceInfos'] = videoDeviceInfos;
|
|
|
map['ReportStateIntervalSeconds'] = reportStateIntervalSeconds;
|
|
@@ -1460,6 +1477,175 @@ class ReportLiveViewStateRequest extends TokenRequest{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class CreateLiveShareInfoResult extends TokenRequest{
|
|
|
+ String? shareUrl;
|
|
|
+
|
|
|
+ CreateLiveShareInfoResult({
|
|
|
+ this.shareUrl,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CreateLiveShareInfoResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CreateLiveShareInfoResult(
|
|
|
+ shareUrl: map['ShareUrl'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(shareUrl != null)
|
|
|
+ map['ShareUrl'] = shareUrl;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class CreateLiveShareInfoRequest extends TokenRequest{
|
|
|
+ String? deviceCode;
|
|
|
+
|
|
|
+ CreateLiveShareInfoRequest({
|
|
|
+ this.deviceCode,
|
|
|
+ String? token,
|
|
|
+ }) : super(
|
|
|
+ token: token,
|
|
|
+ );
|
|
|
+
|
|
|
+ factory CreateLiveShareInfoRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return CreateLiveShareInfoRequest(
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ token: map['Token'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = super.toJson();
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class JoinDeviceLiveRoomByShareResult {
|
|
|
+ int roomNo;
|
|
|
+ String? deviceCode;
|
|
|
+ bool mergedChannel;
|
|
|
+ int mergedVideoOutputWidth;
|
|
|
+ int mergedVideoOutputHeight;
|
|
|
+ List<VideoDeviceInfoDTO >? videoDeviceInfos;
|
|
|
+ int reportStateIntervalSeconds;
|
|
|
+
|
|
|
+ JoinDeviceLiveRoomByShareResult({
|
|
|
+ this.roomNo = 0,
|
|
|
+ this.deviceCode,
|
|
|
+ this.mergedChannel = false,
|
|
|
+ this.mergedVideoOutputWidth = 0,
|
|
|
+ this.mergedVideoOutputHeight = 0,
|
|
|
+ this.videoDeviceInfos,
|
|
|
+ this.reportStateIntervalSeconds = 0,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory JoinDeviceLiveRoomByShareResult.fromJson(Map<String, dynamic> map) {
|
|
|
+ return JoinDeviceLiveRoomByShareResult(
|
|
|
+ roomNo: map['RoomNo'],
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ mergedChannel: map['MergedChannel'],
|
|
|
+ mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
|
|
|
+ mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
|
|
|
+ videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
|
|
|
+ reportStateIntervalSeconds: map['ReportStateIntervalSeconds'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ map['RoomNo'] = roomNo;
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ map['MergedChannel'] = mergedChannel;
|
|
|
+ map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
|
|
|
+ map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
|
|
|
+ if(videoDeviceInfos != null)
|
|
|
+ map['VideoDeviceInfos'] = videoDeviceInfos;
|
|
|
+ map['ReportStateIntervalSeconds'] = reportStateIntervalSeconds;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class JoinDeviceLiveRoomByShareRequest {
|
|
|
+ String? shareCode;
|
|
|
+
|
|
|
+ JoinDeviceLiveRoomByShareRequest({
|
|
|
+ this.shareCode,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory JoinDeviceLiveRoomByShareRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return JoinDeviceLiveRoomByShareRequest(
|
|
|
+ shareCode: map['ShareCode'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(shareCode != null)
|
|
|
+ map['ShareCode'] = shareCode;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class LeaveDeviceLiveRoomByShareRequest {
|
|
|
+ String? deviceCode;
|
|
|
+ String? viewerUniqueId;
|
|
|
+
|
|
|
+ LeaveDeviceLiveRoomByShareRequest({
|
|
|
+ this.deviceCode,
|
|
|
+ this.viewerUniqueId,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory LeaveDeviceLiveRoomByShareRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return LeaveDeviceLiveRoomByShareRequest(
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ viewerUniqueId: map['ViewerUniqueId'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ if(viewerUniqueId != null)
|
|
|
+ map['ViewerUniqueId'] = viewerUniqueId;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class ReportLiveViewStateByShareRequest {
|
|
|
+ String? deviceCode;
|
|
|
+ String? viewerUniqueId;
|
|
|
+
|
|
|
+ ReportLiveViewStateByShareRequest({
|
|
|
+ this.deviceCode,
|
|
|
+ this.viewerUniqueId,
|
|
|
+ });
|
|
|
+
|
|
|
+ factory ReportLiveViewStateByShareRequest.fromJson(Map<String, dynamic> map) {
|
|
|
+ return ReportLiveViewStateByShareRequest(
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
+ viewerUniqueId: map['ViewerUniqueId'],
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, dynamic> toJson() {
|
|
|
+ final map = Map<String, dynamic>();
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
+ if(viewerUniqueId != null)
|
|
|
+ map['ViewerUniqueId'] = viewerUniqueId;
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
enum DeviceLiveStateEnum {
|
|
|
Default,
|
|
|
Pushing,
|