tencentcloud-sdk-trtc 1.0.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-trtc.rb +11 -0
- data/lib/v20190722/client.rb +620 -0
- data/lib/v20190722/models.rb +2042 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2257ee02e7096e7c48f67d7087b4849c91e323b3
|
4
|
+
data.tar.gz: 67db6e25c26900ebef9bf7c470aac88f8d910be1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e1312b8c4ba66c25d7ca2b4ce49ff6c6d6b1db1124d58b989af6617e722842b950ec296a6d0975b6e39d33732081b42a7db2df8d2d048a77b57191d45ad6b71
|
7
|
+
data.tar.gz: 5f2f3a02783a8caefcb7acf4820d09202a73ae8d9d4be3947f5696e4fdf8c430ec62d4ce3fa309338f12a44b7568edfbc514a06bb2d85093fb7e4bd696973af8
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -0,0 +1,620 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module TencentCloud
|
20
|
+
module Trtc
|
21
|
+
module V20190722
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2019-07-22'
|
26
|
+
api_endpoint = 'trtc.tencentcloudapi.com'
|
27
|
+
sdk_version = 'TRTC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 如果您需要在 [云端混流转码](https://cloud.tencent.com/document/product/647/16827) 时频繁新增自定义背景图或水印,可通过此接口上传新的图片素材。无需频繁新增图片的场景,建议直接在 [控制台 > 应用管理 > 素材管理](https://cloud.tencent.com/document/product/647/50769) 中操作。
|
33
|
+
|
34
|
+
# @param request: Request instance for CreatePicture.
|
35
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::CreatePictureRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::CreatePictureResponse`
|
37
|
+
def CreatePicture(request)
|
38
|
+
body = send_request('CreatePicture', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = CreatePictureResponse.new
|
42
|
+
model.deserialize(response['Response'])
|
43
|
+
model
|
44
|
+
else
|
45
|
+
code = response['Response']['Error']['Code']
|
46
|
+
message = response['Response']['Error']['Message']
|
47
|
+
reqid = response['Response']['RequestId']
|
48
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
49
|
+
end
|
50
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
51
|
+
raise e
|
52
|
+
rescue StandardError => e
|
53
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
54
|
+
end
|
55
|
+
|
56
|
+
# 创建异常信息
|
57
|
+
|
58
|
+
# @param request: Request instance for CreateTroubleInfo.
|
59
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::CreateTroubleInfoRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::CreateTroubleInfoResponse`
|
61
|
+
def CreateTroubleInfo(request)
|
62
|
+
body = send_request('CreateTroubleInfo', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = CreateTroubleInfoResponse.new
|
66
|
+
model.deserialize(response['Response'])
|
67
|
+
model
|
68
|
+
else
|
69
|
+
code = response['Response']['Error']['Code']
|
70
|
+
message = response['Response']['Error']['Message']
|
71
|
+
reqid = response['Response']['RequestId']
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
73
|
+
end
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
75
|
+
raise e
|
76
|
+
rescue StandardError => e
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
78
|
+
end
|
79
|
+
|
80
|
+
# 如果您需要在 [云端混流转码](https://cloud.tencent.com/document/product/647/16827) 时频繁删除自定义背景图或水印,可通过此接口删除已上传的图片。无需频繁删除图片的场景,建议直接在 [控制台 > 应用管理 > 素材管理](https://cloud.tencent.com/document/product/647/50769) 中操作。
|
81
|
+
|
82
|
+
# @param request: Request instance for DeletePicture.
|
83
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DeletePictureRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DeletePictureResponse`
|
85
|
+
def DeletePicture(request)
|
86
|
+
body = send_request('DeletePicture', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = DeletePictureResponse.new
|
90
|
+
model.deserialize(response['Response'])
|
91
|
+
model
|
92
|
+
else
|
93
|
+
code = response['Response']['Error']['Code']
|
94
|
+
message = response['Response']['Error']['Message']
|
95
|
+
reqid = response['Response']['RequestId']
|
96
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
97
|
+
end
|
98
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
99
|
+
raise e
|
100
|
+
rescue StandardError => e
|
101
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
102
|
+
end
|
103
|
+
|
104
|
+
# 查询SDKAppID下用户的异常体验事件,返回异常体验ID与可能产生异常体验的原因。可查询15天内数据,查询起止时间不超过1个小时。支持跨天查询。异常体验ID映射见:https://cloud.tencent.com/document/product/647/44916
|
105
|
+
|
106
|
+
# @param request: Request instance for DescribeAbnormalEvent.
|
107
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeAbnormalEventRequest`
|
108
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeAbnormalEventResponse`
|
109
|
+
def DescribeAbnormalEvent(request)
|
110
|
+
body = send_request('DescribeAbnormalEvent', request.serialize)
|
111
|
+
response = JSON.parse(body)
|
112
|
+
if response['Response'].key?('Error') == false
|
113
|
+
model = DescribeAbnormalEventResponse.new
|
114
|
+
model.deserialize(response['Response'])
|
115
|
+
model
|
116
|
+
else
|
117
|
+
code = response['Response']['Error']['Code']
|
118
|
+
message = response['Response']['Error']['Message']
|
119
|
+
reqid = response['Response']['RequestId']
|
120
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
121
|
+
end
|
122
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
123
|
+
raise e
|
124
|
+
rescue StandardError => e
|
125
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
126
|
+
end
|
127
|
+
|
128
|
+
# 查询指定时间内的用户列表及用户通话质量数据,可查询14天内数据。DataType 不为null,查询起止时间不超过1个小时,查询用户不超过6个,支持跨天查询。DataType,UserIds为null时,查询起止时间不超过4个小时, 默认查询6个用户,同时支持每页查询100以内用户个数(PageSize不超过100)。接口用于查询质量问题,不推荐作为计费使用。
|
129
|
+
# **注意**:该接口只用于历史数据统计或核对数据使用,实时类关键业务逻辑不能使用。
|
130
|
+
|
131
|
+
# @param request: Request instance for DescribeCallDetail.
|
132
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeCallDetailRequest`
|
133
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeCallDetailResponse`
|
134
|
+
def DescribeCallDetail(request)
|
135
|
+
body = send_request('DescribeCallDetail', request.serialize)
|
136
|
+
response = JSON.parse(body)
|
137
|
+
if response['Response'].key?('Error') == false
|
138
|
+
model = DescribeCallDetailResponse.new
|
139
|
+
model.deserialize(response['Response'])
|
140
|
+
model
|
141
|
+
else
|
142
|
+
code = response['Response']['Error']['Code']
|
143
|
+
message = response['Response']['Error']['Message']
|
144
|
+
reqid = response['Response']['RequestId']
|
145
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
146
|
+
end
|
147
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
148
|
+
raise e
|
149
|
+
rescue StandardError => e
|
150
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
151
|
+
end
|
152
|
+
|
153
|
+
# 查询用户某次通话内的进退房,视频开关等详细事件。可查询14天内数据。
|
154
|
+
|
155
|
+
# @param request: Request instance for DescribeDetailEvent.
|
156
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeDetailEventRequest`
|
157
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeDetailEventResponse`
|
158
|
+
def DescribeDetailEvent(request)
|
159
|
+
body = send_request('DescribeDetailEvent', request.serialize)
|
160
|
+
response = JSON.parse(body)
|
161
|
+
if response['Response'].key?('Error') == false
|
162
|
+
model = DescribeDetailEventResponse.new
|
163
|
+
model.deserialize(response['Response'])
|
164
|
+
model
|
165
|
+
else
|
166
|
+
code = response['Response']['Error']['Code']
|
167
|
+
message = response['Response']['Error']['Message']
|
168
|
+
reqid = response['Response']['RequestId']
|
169
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
170
|
+
end
|
171
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
172
|
+
raise e
|
173
|
+
rescue StandardError => e
|
174
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
175
|
+
end
|
176
|
+
|
177
|
+
# 可查询sdkqppid 每天的房间数和用户数,每分钟1次,可查询最近14天的数据。当天未结束,无法查到当天的房间数与用户数。
|
178
|
+
|
179
|
+
# @param request: Request instance for DescribeHistoryScale.
|
180
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeHistoryScaleRequest`
|
181
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeHistoryScaleResponse`
|
182
|
+
def DescribeHistoryScale(request)
|
183
|
+
body = send_request('DescribeHistoryScale', request.serialize)
|
184
|
+
response = JSON.parse(body)
|
185
|
+
if response['Response'].key?('Error') == false
|
186
|
+
model = DescribeHistoryScaleResponse.new
|
187
|
+
model.deserialize(response['Response'])
|
188
|
+
model
|
189
|
+
else
|
190
|
+
code = response['Response']['Error']['Code']
|
191
|
+
message = response['Response']['Error']['Message']
|
192
|
+
reqid = response['Response']['RequestId']
|
193
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
194
|
+
end
|
195
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
196
|
+
raise e
|
197
|
+
rescue StandardError => e
|
198
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
199
|
+
end
|
200
|
+
|
201
|
+
# 如果您需要在 [云端混流转码](https://cloud.tencent.com/document/product/647/16827) 时频繁查找自定义背景图或水印信息,可通过此接口查找已上传的图片信息。无需频繁查找图片信息的场景,建议直接在 [控制台 > 应用管理 > 素材管理](https://cloud.tencent.com/document/product/647/50769) 中查看。
|
202
|
+
|
203
|
+
# @param request: Request instance for DescribePicture.
|
204
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribePictureRequest`
|
205
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribePictureResponse`
|
206
|
+
def DescribePicture(request)
|
207
|
+
body = send_request('DescribePicture', request.serialize)
|
208
|
+
response = JSON.parse(body)
|
209
|
+
if response['Response'].key?('Error') == false
|
210
|
+
model = DescribePictureResponse.new
|
211
|
+
model.deserialize(response['Response'])
|
212
|
+
model
|
213
|
+
else
|
214
|
+
code = response['Response']['Error']['Code']
|
215
|
+
message = response['Response']['Error']['Message']
|
216
|
+
reqid = response['Response']['RequestId']
|
217
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
218
|
+
end
|
219
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
220
|
+
raise e
|
221
|
+
rescue StandardError => e
|
222
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
223
|
+
end
|
224
|
+
|
225
|
+
# 查询云端录制计费时长。
|
226
|
+
|
227
|
+
# - 查询时间小于等于1天时,返回每5分钟粒度的数据;查询时间大于1天时,返回按天汇总的数据。
|
228
|
+
# - 单次查询统计区间最多不能超过31天。
|
229
|
+
# - 若查询当天用量,由于统计延迟等原因,返回数据可能不够准确。
|
230
|
+
# - 日结后付费将于次日上午推送账单,建议次日上午9点以后再来查询前一天的用量。
|
231
|
+
|
232
|
+
# @param request: Request instance for DescribeRecordStatistic.
|
233
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeRecordStatisticRequest`
|
234
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeRecordStatisticResponse`
|
235
|
+
def DescribeRecordStatistic(request)
|
236
|
+
body = send_request('DescribeRecordStatistic', request.serialize)
|
237
|
+
response = JSON.parse(body)
|
238
|
+
if response['Response'].key?('Error') == false
|
239
|
+
model = DescribeRecordStatisticResponse.new
|
240
|
+
model.deserialize(response['Response'])
|
241
|
+
model
|
242
|
+
else
|
243
|
+
code = response['Response']['Error']['Code']
|
244
|
+
message = response['Response']['Error']['Message']
|
245
|
+
reqid = response['Response']['RequestId']
|
246
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
247
|
+
end
|
248
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
249
|
+
raise e
|
250
|
+
rescue StandardError => e
|
251
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
252
|
+
end
|
253
|
+
|
254
|
+
# 查询sdkappid下的房间列表。默认返回10条通话,一次最多返回100条通话。可查询14天内的数据。
|
255
|
+
# **注意**:该接口只用于历史数据统计或核对数据使用,实时类关键业务逻辑不能使用。
|
256
|
+
|
257
|
+
# @param request: Request instance for DescribeRoomInformation.
|
258
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeRoomInformationRequest`
|
259
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeRoomInformationResponse`
|
260
|
+
def DescribeRoomInformation(request)
|
261
|
+
body = send_request('DescribeRoomInformation', request.serialize)
|
262
|
+
response = JSON.parse(body)
|
263
|
+
if response['Response'].key?('Error') == false
|
264
|
+
model = DescribeRoomInformationResponse.new
|
265
|
+
model.deserialize(response['Response'])
|
266
|
+
model
|
267
|
+
else
|
268
|
+
code = response['Response']['Error']['Code']
|
269
|
+
message = response['Response']['Error']['Message']
|
270
|
+
reqid = response['Response']['RequestId']
|
271
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
272
|
+
end
|
273
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
274
|
+
raise e
|
275
|
+
rescue StandardError => e
|
276
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
277
|
+
end
|
278
|
+
|
279
|
+
# 查询音视频互动计费时长。
|
280
|
+
# - 查询时间小于等于1天时,返回每5分钟粒度的数据;查询时间大于1天时,返回按天汇总的数据。
|
281
|
+
# - 单次查询统计区间最多不能超过31天。
|
282
|
+
# - 若查询当天用量,由于统计延迟等原因,返回数据可能不够准确。
|
283
|
+
# - 日结后付费将于次日上午推送账单,建议次日上午9点以后再来查询前一天的用量。
|
284
|
+
|
285
|
+
# @param request: Request instance for DescribeTrtcInteractiveTime.
|
286
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeTrtcInteractiveTimeRequest`
|
287
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeTrtcInteractiveTimeResponse`
|
288
|
+
def DescribeTrtcInteractiveTime(request)
|
289
|
+
body = send_request('DescribeTrtcInteractiveTime', request.serialize)
|
290
|
+
response = JSON.parse(body)
|
291
|
+
if response['Response'].key?('Error') == false
|
292
|
+
model = DescribeTrtcInteractiveTimeResponse.new
|
293
|
+
model.deserialize(response['Response'])
|
294
|
+
model
|
295
|
+
else
|
296
|
+
code = response['Response']['Error']['Code']
|
297
|
+
message = response['Response']['Error']['Message']
|
298
|
+
reqid = response['Response']['RequestId']
|
299
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
300
|
+
end
|
301
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
302
|
+
raise e
|
303
|
+
rescue StandardError => e
|
304
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
305
|
+
end
|
306
|
+
|
307
|
+
# 查询旁路转码计费时长。
|
308
|
+
# - 查询时间小于等于1天时,返回每5分钟粒度的数据;查询时间大于1天时,返回按天汇总的数据。
|
309
|
+
# - 单次查询统计区间最多不能超过31天。
|
310
|
+
# - 若查询当天用量,由于统计延迟等原因,返回数据可能不够准确。
|
311
|
+
# - 日结后付费将于次日上午推送账单,建议次日上午9点以后再来查询前一天的用量。
|
312
|
+
|
313
|
+
# @param request: Request instance for DescribeTrtcMcuTranscodeTime.
|
314
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeTrtcMcuTranscodeTimeRequest`
|
315
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeTrtcMcuTranscodeTimeResponse`
|
316
|
+
def DescribeTrtcMcuTranscodeTime(request)
|
317
|
+
body = send_request('DescribeTrtcMcuTranscodeTime', request.serialize)
|
318
|
+
response = JSON.parse(body)
|
319
|
+
if response['Response'].key?('Error') == false
|
320
|
+
model = DescribeTrtcMcuTranscodeTimeResponse.new
|
321
|
+
model.deserialize(response['Response'])
|
322
|
+
model
|
323
|
+
else
|
324
|
+
code = response['Response']['Error']['Code']
|
325
|
+
message = response['Response']['Error']['Message']
|
326
|
+
reqid = response['Response']['RequestId']
|
327
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
328
|
+
end
|
329
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
330
|
+
raise e
|
331
|
+
rescue StandardError => e
|
332
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
333
|
+
end
|
334
|
+
|
335
|
+
# 查询指定时间内的用户列表,可查询14天内数据,查询起止时间不超过4小时。默认每页查询6个用户,支持每页最大查询100个用户PageSize不超过100)。
|
336
|
+
# **注意**:该接口只用于历史数据统计或核对数据使用,实时类关键业务逻辑不能使用。
|
337
|
+
|
338
|
+
# @param request: Request instance for DescribeUserInformation.
|
339
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DescribeUserInformationRequest`
|
340
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DescribeUserInformationResponse`
|
341
|
+
def DescribeUserInformation(request)
|
342
|
+
body = send_request('DescribeUserInformation', request.serialize)
|
343
|
+
response = JSON.parse(body)
|
344
|
+
if response['Response'].key?('Error') == false
|
345
|
+
model = DescribeUserInformationResponse.new
|
346
|
+
model.deserialize(response['Response'])
|
347
|
+
model
|
348
|
+
else
|
349
|
+
code = response['Response']['Error']['Code']
|
350
|
+
message = response['Response']['Error']['Message']
|
351
|
+
reqid = response['Response']['RequestId']
|
352
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
353
|
+
end
|
354
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
355
|
+
raise e
|
356
|
+
rescue StandardError => e
|
357
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
358
|
+
end
|
359
|
+
|
360
|
+
# 接口说明:把房间所有用户从房间移出,解散房间。支持所有平台,Android、iOS、Windows 和 macOS 需升级到 TRTC SDK 6.6及以上版本。
|
361
|
+
|
362
|
+
# @param request: Request instance for DismissRoom.
|
363
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DismissRoomRequest`
|
364
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DismissRoomResponse`
|
365
|
+
def DismissRoom(request)
|
366
|
+
body = send_request('DismissRoom', request.serialize)
|
367
|
+
response = JSON.parse(body)
|
368
|
+
if response['Response'].key?('Error') == false
|
369
|
+
model = DismissRoomResponse.new
|
370
|
+
model.deserialize(response['Response'])
|
371
|
+
model
|
372
|
+
else
|
373
|
+
code = response['Response']['Error']['Code']
|
374
|
+
message = response['Response']['Error']['Message']
|
375
|
+
reqid = response['Response']['RequestId']
|
376
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
377
|
+
end
|
378
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
379
|
+
raise e
|
380
|
+
rescue StandardError => e
|
381
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
382
|
+
end
|
383
|
+
|
384
|
+
# 接口说明:把房间所有用户从房间移出,解散房间。支持所有平台,Android、iOS、Windows 和 macOS 需升级到 TRTC SDK 6.6及以上版本。
|
385
|
+
|
386
|
+
# @param request: Request instance for DismissRoomByStrRoomId.
|
387
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::DismissRoomByStrRoomIdRequest`
|
388
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::DismissRoomByStrRoomIdResponse`
|
389
|
+
def DismissRoomByStrRoomId(request)
|
390
|
+
body = send_request('DismissRoomByStrRoomId', request.serialize)
|
391
|
+
response = JSON.parse(body)
|
392
|
+
if response['Response'].key?('Error') == false
|
393
|
+
model = DismissRoomByStrRoomIdResponse.new
|
394
|
+
model.deserialize(response['Response'])
|
395
|
+
model
|
396
|
+
else
|
397
|
+
code = response['Response']['Error']['Code']
|
398
|
+
message = response['Response']['Error']['Message']
|
399
|
+
reqid = response['Response']['RequestId']
|
400
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
401
|
+
end
|
402
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
403
|
+
raise e
|
404
|
+
rescue StandardError => e
|
405
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
406
|
+
end
|
407
|
+
|
408
|
+
# 如果您需要在 [云端混流转码](https://cloud.tencent.com/document/product/647/16827) 时频繁修改自定义背景图或水印素材,可通过此接口修改已上传的图片。无需频繁修改图片素材的场景,建议直接在 [控制台 > 应用管理 > 素材管理](https://cloud.tencent.com/document/product/647/50769) 中操作。
|
409
|
+
|
410
|
+
# @param request: Request instance for ModifyPicture.
|
411
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::ModifyPictureRequest`
|
412
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::ModifyPictureResponse`
|
413
|
+
def ModifyPicture(request)
|
414
|
+
body = send_request('ModifyPicture', request.serialize)
|
415
|
+
response = JSON.parse(body)
|
416
|
+
if response['Response'].key?('Error') == false
|
417
|
+
model = ModifyPictureResponse.new
|
418
|
+
model.deserialize(response['Response'])
|
419
|
+
model
|
420
|
+
else
|
421
|
+
code = response['Response']['Error']['Code']
|
422
|
+
message = response['Response']['Error']['Message']
|
423
|
+
reqid = response['Response']['RequestId']
|
424
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
425
|
+
end
|
426
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
427
|
+
raise e
|
428
|
+
rescue StandardError => e
|
429
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
430
|
+
end
|
431
|
+
|
432
|
+
# 接口说明:将用户从房间移出,适用于主播/房主/管理员踢人等场景。支持所有平台,Android、iOS、Windows 和 macOS 需升级到 TRTC SDK 6.6及以上版本。
|
433
|
+
|
434
|
+
# @param request: Request instance for RemoveUser.
|
435
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::RemoveUserRequest`
|
436
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::RemoveUserResponse`
|
437
|
+
def RemoveUser(request)
|
438
|
+
body = send_request('RemoveUser', request.serialize)
|
439
|
+
response = JSON.parse(body)
|
440
|
+
if response['Response'].key?('Error') == false
|
441
|
+
model = RemoveUserResponse.new
|
442
|
+
model.deserialize(response['Response'])
|
443
|
+
model
|
444
|
+
else
|
445
|
+
code = response['Response']['Error']['Code']
|
446
|
+
message = response['Response']['Error']['Message']
|
447
|
+
reqid = response['Response']['RequestId']
|
448
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
449
|
+
end
|
450
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
451
|
+
raise e
|
452
|
+
rescue StandardError => e
|
453
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
454
|
+
end
|
455
|
+
|
456
|
+
# 接口说明:将用户从房间移出,适用于主播/房主/管理员踢人等场景。支持所有平台,Android、iOS、Windows 和 macOS 需升级到 TRTC SDK 6.6及以上版本。
|
457
|
+
|
458
|
+
# @param request: Request instance for RemoveUserByStrRoomId.
|
459
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::RemoveUserByStrRoomIdRequest`
|
460
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::RemoveUserByStrRoomIdResponse`
|
461
|
+
def RemoveUserByStrRoomId(request)
|
462
|
+
body = send_request('RemoveUserByStrRoomId', request.serialize)
|
463
|
+
response = JSON.parse(body)
|
464
|
+
if response['Response'].key?('Error') == false
|
465
|
+
model = RemoveUserByStrRoomIdResponse.new
|
466
|
+
model.deserialize(response['Response'])
|
467
|
+
model
|
468
|
+
else
|
469
|
+
code = response['Response']['Error']['Code']
|
470
|
+
message = response['Response']['Error']['Message']
|
471
|
+
reqid = response['Response']['RequestId']
|
472
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
473
|
+
end
|
474
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
475
|
+
raise e
|
476
|
+
rescue StandardError => e
|
477
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
478
|
+
end
|
479
|
+
|
480
|
+
# 接口说明:启动云端混流,并指定混流画面中各路画面的布局位置。
|
481
|
+
|
482
|
+
# TRTC 的一个房间中可能会同时存在多路音视频流,您可以通过此 API 接口,通知腾讯云服务端将多路视频画面合成一路,并指定每一路画面的位置,同时将多路声音进行混音,最终形成一路音视频流,以便用于录制和直播观看。房间销毁后混流自动结束。
|
483
|
+
|
484
|
+
# 您可以通过此接口实现如下目标:
|
485
|
+
# - 设置最终直播流的画质和音质,包括视频分辨率、视频码率、视频帧率、以及声音质量等。
|
486
|
+
# - 设置各路画面的位置和布局,您只需要在启动时设置一次,排版引擎会自动完成后续的画面排布。
|
487
|
+
# - 设置录制文件名,用于二次回放。
|
488
|
+
# - 设置 CDN 直播流 ID,用于在 CDN 进行直播观看。
|
489
|
+
|
490
|
+
# 目前已经支持了如下几种布局模板:
|
491
|
+
# - 悬浮模板:第一个进入房间的用户的视频画面会铺满整个屏幕,其他用户的视频画面从左下角依次水平排列,显示为小画面,最多4行,每行4个,小画面悬浮于大画面之上。最多支持1个大画面和15个小画面,如果用户只发送音频,仍然会占用画面位置。
|
492
|
+
# - 九宫格模板:所有用户的视频画面大小一致,平分整个屏幕,人数越多,每个画面的尺寸越小。最多支持16个画面,如果用户只发送音频,仍然会占用画面位置。
|
493
|
+
# - 屏幕分享模板:适合视频会议和在线教育场景的布局,屏幕分享(或者主讲的摄像头)始终占据屏幕左侧的大画面位置,其他用户依次垂直排列于右侧,最多两列,每列最多8个小画面。最多支持1个大画面和15个小画面。若上行分辨率宽高比与画面输出宽高比不一致时,左侧大画面为了保持内容的完整性采用缩放方式处理,右侧小画面采用裁剪方式处理。
|
494
|
+
# - 画中画模板:适用于混合大小两路视频画面和其他用户混音,或者混合一路大画面和其他用户混音的场景。小画面悬浮于大画面之上,可以指定大小画面的用户以及小画面的显示位置,最多支持2个画面。
|
495
|
+
# - 自定义模板:适用于在混流中指定用户的画面位置,或者预设视频画面位置的场景。当预设位置指定用户时,排版引擎会该用户预留位置;当预设位置未指定用户时,排版引擎会根据进房间顺序自动填充。预设位置填满时,不再混合其他用户的画面和声音。自定义模板启用占位图功能时(LayoutParams中的PlaceHolderMode设置成1),在预设位置的用户没有上行视频时可显示对应的占位图(PlaceImageId)。
|
496
|
+
|
497
|
+
# 注意:
|
498
|
+
# 1、**混流转码为收费功能,调用接口将产生云端混流转码费用,详见[云端混流转码计费说明](https://cloud.tencent.com/document/product/647/49446)。**
|
499
|
+
# 2、2020年1月9号及以后创建的应用才能直接调用此接口。2020年1月9日之前创建的应用默认使用云直播的云端混流,如需切换至MCU混流,请[提交工单](https://console.cloud.tencent.com/workorder/category)寻求帮助。
|
500
|
+
# 3、客户端混流和服务端混流不能混用。
|
501
|
+
|
502
|
+
# @param request: Request instance for StartMCUMixTranscode.
|
503
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::StartMCUMixTranscodeRequest`
|
504
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::StartMCUMixTranscodeResponse`
|
505
|
+
def StartMCUMixTranscode(request)
|
506
|
+
body = send_request('StartMCUMixTranscode', request.serialize)
|
507
|
+
response = JSON.parse(body)
|
508
|
+
if response['Response'].key?('Error') == false
|
509
|
+
model = StartMCUMixTranscodeResponse.new
|
510
|
+
model.deserialize(response['Response'])
|
511
|
+
model
|
512
|
+
else
|
513
|
+
code = response['Response']['Error']['Code']
|
514
|
+
message = response['Response']['Error']['Message']
|
515
|
+
reqid = response['Response']['RequestId']
|
516
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
517
|
+
end
|
518
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
519
|
+
raise e
|
520
|
+
rescue StandardError => e
|
521
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
522
|
+
end
|
523
|
+
|
524
|
+
# 接口说明:启动云端混流,并指定混流画面中各路画面的布局位置。
|
525
|
+
|
526
|
+
# TRTC 的一个房间中可能会同时存在多路音视频流,您可以通过此 API 接口,通知腾讯云服务端将多路视频画面合成一路,并指定每一路画面的位置,同时将多路声音进行混音,最终形成一路音视频流,以便用于录制和直播观看。
|
527
|
+
|
528
|
+
# 您可以通过此接口实现如下目标:
|
529
|
+
# - 设置最终直播流的画质和音质,包括视频分辨率、视频码率、视频帧率、以及声音质量等。
|
530
|
+
# - 设置各路画面的位置和布局,您只需要在启动时设置一次,排版引擎会自动完成后续的画面排布。
|
531
|
+
# - 设置录制文件名,用于二次回放。
|
532
|
+
# - 设置 CDN 直播流 ID,用于在 CDN 进行直播观看。
|
533
|
+
|
534
|
+
# 目前已经支持了如下几种布局模板:
|
535
|
+
# - 悬浮模板:第一个进入房间的用户的视频画面会铺满整个屏幕,其他用户的视频画面从左下角依次水平排列,显示为小画面,最多4行,每行4个,小画面悬浮于大画面之上。最多支持1个大画面和15个小画面,如果用户只发送音频,仍然会占用画面位置。
|
536
|
+
# - 九宫格模板:所有用户的视频画面大小一致,平分整个屏幕,人数越多,每个画面的尺寸越小。最多支持16个画面,如果用户只发送音频,仍然会占用画面位置。
|
537
|
+
# - 屏幕分享模板:适合视频会议和在线教育场景的布局,屏幕分享(或者主讲的摄像头)始终占据屏幕左侧的大画面位置,其他用户依次垂直排列于右侧,最多两列,每列最多8个小画面。最多支持1个大画面和15个小画面。若上行分辨率宽高比与画面输出宽高比不一致时,左侧大画面为了保持内容的完整性采用缩放方式处理,右侧小画面采用裁剪方式处理。
|
538
|
+
# - 画中画模板:适用于混合大小两路视频画面和其他用户混音,或者混合一路大画面和其他用户混音的场景。小画面悬浮于大画面之上,可以指定大小画面的用户以及小画面的显示位置。
|
539
|
+
# - 自定义模板:适用于在混流中指定用户的画面位置,或者预设视频画面位置的场景。当预设位置指定用户时,排版引擎会该用户预留位置;当预设位置未指定用户时,排版引擎会根据进房间顺序自动填充。预设位置填满时,不再混合其他用户的画面和声音。自定义模板启用占位图功能时(LayoutParams中的PlaceHolderMode设置成1),在预设位置的用户没有上行视频时可显示对应的占位图(PlaceImageId)。
|
540
|
+
|
541
|
+
# 注意:
|
542
|
+
# 1、**混流转码为收费功能,调用接口将产生云端混流转码费用,详见[云端混流转码计费说明](https://cloud.tencent.com/document/product/647/49446)。**
|
543
|
+
# 2、2020年1月9号及以后创建的应用才能直接调用此接口。2020年1月9日之前创建的应用默认使用云直播的云端混流,如需切换至MCU混流,请[提交工单](https://console.cloud.tencent.com/workorder/category)寻求帮助。
|
544
|
+
# 3、客户端混流和服务端混流不能混用。
|
545
|
+
|
546
|
+
# @param request: Request instance for StartMCUMixTranscodeByStrRoomId.
|
547
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::StartMCUMixTranscodeByStrRoomIdRequest`
|
548
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::StartMCUMixTranscodeByStrRoomIdResponse`
|
549
|
+
def StartMCUMixTranscodeByStrRoomId(request)
|
550
|
+
body = send_request('StartMCUMixTranscodeByStrRoomId', request.serialize)
|
551
|
+
response = JSON.parse(body)
|
552
|
+
if response['Response'].key?('Error') == false
|
553
|
+
model = StartMCUMixTranscodeByStrRoomIdResponse.new
|
554
|
+
model.deserialize(response['Response'])
|
555
|
+
model
|
556
|
+
else
|
557
|
+
code = response['Response']['Error']['Code']
|
558
|
+
message = response['Response']['Error']['Message']
|
559
|
+
reqid = response['Response']['RequestId']
|
560
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
561
|
+
end
|
562
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
563
|
+
raise e
|
564
|
+
rescue StandardError => e
|
565
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
566
|
+
end
|
567
|
+
|
568
|
+
# 接口说明:结束云端混流
|
569
|
+
|
570
|
+
# @param request: Request instance for StopMCUMixTranscode.
|
571
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::StopMCUMixTranscodeRequest`
|
572
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::StopMCUMixTranscodeResponse`
|
573
|
+
def StopMCUMixTranscode(request)
|
574
|
+
body = send_request('StopMCUMixTranscode', request.serialize)
|
575
|
+
response = JSON.parse(body)
|
576
|
+
if response['Response'].key?('Error') == false
|
577
|
+
model = StopMCUMixTranscodeResponse.new
|
578
|
+
model.deserialize(response['Response'])
|
579
|
+
model
|
580
|
+
else
|
581
|
+
code = response['Response']['Error']['Code']
|
582
|
+
message = response['Response']['Error']['Message']
|
583
|
+
reqid = response['Response']['RequestId']
|
584
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
585
|
+
end
|
586
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
587
|
+
raise e
|
588
|
+
rescue StandardError => e
|
589
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
590
|
+
end
|
591
|
+
|
592
|
+
# 接口说明:结束云端混流
|
593
|
+
|
594
|
+
# @param request: Request instance for StopMCUMixTranscodeByStrRoomId.
|
595
|
+
# @type request: :class:`Tencentcloud::trtc::V20190722::StopMCUMixTranscodeByStrRoomIdRequest`
|
596
|
+
# @rtype: :class:`Tencentcloud::trtc::V20190722::StopMCUMixTranscodeByStrRoomIdResponse`
|
597
|
+
def StopMCUMixTranscodeByStrRoomId(request)
|
598
|
+
body = send_request('StopMCUMixTranscodeByStrRoomId', request.serialize)
|
599
|
+
response = JSON.parse(body)
|
600
|
+
if response['Response'].key?('Error') == false
|
601
|
+
model = StopMCUMixTranscodeByStrRoomIdResponse.new
|
602
|
+
model.deserialize(response['Response'])
|
603
|
+
model
|
604
|
+
else
|
605
|
+
code = response['Response']['Error']['Code']
|
606
|
+
message = response['Response']['Error']['Message']
|
607
|
+
reqid = response['Response']['RequestId']
|
608
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
609
|
+
end
|
610
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
611
|
+
raise e
|
612
|
+
rescue StandardError => e
|
613
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
614
|
+
end
|
615
|
+
|
616
|
+
|
617
|
+
end
|
618
|
+
end
|
619
|
+
end
|
620
|
+
end
|