dever 6 lat temu
rodzic
commit
3cb6898782
2 zmienionych plików z 10 dodań i 2 usunięć
  1. 6 2
      doc/apidoc.php
  2. 4 0
      video/lib/Live.php

+ 6 - 2
doc/apidoc.php

@@ -465,7 +465,7 @@
  * @apiSuccess {Object[]} info 直播数据
  * @apiSuccess {String}   info.id 
  * @apiSuccess {String}   info.name 名称
- * @apiSuccess {String}   info.pic_cover 图片
+ * @apiSuccess {String}   info.pic_cover 封面图片
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.num_user 在线人数
@@ -479,7 +479,11 @@
  * @apiSuccess {String}   info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  * @apiSuccess {String}   info.content 直播介绍
  * @apiSuccess {String}   info.stream 直播推流地址
- * @apiSuccess {String}   info.url_mp4 回访播放地址
+ * @apiSuccess {String}   info.stream_rtmp 直播高清播放地址
+ * @apiSuccess {String}   info.stream_hls 直播标清播放地址
+ * @apiSuccess {String}   info.stream_hdl 直播普清播放地址
+ * @apiSuccess {String}   info.stream_pic 直播截图地址,直播中时,可以用来替代pic_cover
+ * @apiSuccess {String}   info.url_mp4 回放播放地址
  * @apiSuccess {String}   info.status 直播状态1为未开始2为直播中3为已结束
  *
  *

+ 4 - 0
video/lib/Live.php

@@ -23,6 +23,10 @@ class Live
         if ($data['sdate'] <= $time && $time <= $data['edate']) {
             $stream = Dever::db('live/stream')->one($data['stream_id']);
             $data['stream'] = $stream['live'];
+            $data['stream_rtmp'] = $stream['url_rtmp'];
+            $data['stream_hls'] = $stream['url_hls'];
+            $data['stream_hdl'] = $stream['url_hdl'];
+            $data['stream_pic'] = $stream['url_pic'];
             $data['status'] = 2;
         }