File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,43 @@ public function StartLiveStream($streamName)
201201 ]);
202202 }
203203
204+ /**
205+ * 实时查询在线人数的请求参数
206+ * @param null|string $streamName
207+ * @param null|int $startTime
208+ * @param null|int $endTime
209+ * @return string
210+ */
211+ public function DescribeLiveStreamOnlineUserNum ($ streamName = null , $ startTime = null , $ endTime = null )
212+ {
213+ $ params = [
214+ 'Action ' => 'DescribeLiveStreamOnlineUserNum ' ,
215+ 'DomainName ' => $ this ->domain ,
216+ 'AppName ' => $ this ->appName
217+ ];
218+ if (!empty ($ streamName )) {
219+ $ params ['StreamName ' ] = $ streamName ;
220+ }
221+ if (!empty ($ startTime ) && !empty ($ endTime )) {
222+ $ params ['StartTime ' ] = gmdate ('Y-m-d\TH:i:s\Z ' , $ startTime );
223+ $ params ['EndTime ' ] = gmdate ('Y-m-d\TH:i:s\Z ' , $ endTime );
224+ }
225+ return $ this ->createRequest ($ params );
226+ }
227+
228+ /**
229+ * 查询在线的直播推流列表
230+ * @return string
231+ */
232+ public function DescribeLiveStreamsOnlineList ()
233+ {
234+ return $ this ->createRequest ([
235+ 'Action ' => 'DescribeLiveStreamsOnlineList ' ,
236+ 'DomainName ' => $ this ->domain ,
237+ 'AppName ' => $ this ->appName
238+ ]);
239+ }
240+
204241 /**
205242 * 直播签名
206243 * @param string $streamName
You can’t perform that action at this time.
0 commit comments