Authored by xiaofeng.yao@yoho.cn

增加直播预告时间字段

... ... @@ -388,7 +388,9 @@
"hls_downstream_address": "http://2718.liveplay.myqcloud.com/2718_3baa8de762c411e6a2cba4dcbef5e35a.m3u8",
"live_last_time": "321",
"background_pic": "http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png",
"share_url": "http://m.yohobuy.com/activity/live/2266102578"
"share_url": "http://m.yohobuy.com/activity/live/2266102578",
"share_title":"分享标题",
"share_content":"分享内容"
},
"timestamp": 1471339317,
"md5": "36ca1d1279edc257a8dd5ee1ae052bc6"
... ... @@ -407,13 +409,15 @@
| like_num | int|点赞数
| audience_num | int|正在观看人数
| live_start_time | int|直播开始时间(时间戳)
| starting_time |int|直播预告时间(时间戳)
| rtmp_downstream_address | str|rtmp下行地址
| flv_downstream_address | str|flv下行地址
| hls_downstream_address | str|hls下行地址
| live_last_time | int|直播时长(秒)
| background_pic | str|房间背景图片url
| share_url | str|分享链接url
| share_title | str|分享标题
| share_content | str|分享内容
# **回放视频详情**
... ... @@ -485,6 +489,8 @@
| live_end_time | int|直播结束时间(时间戳)
| background_pic | str|房间背景图片url
| share_url | str|分享链接url
| share_title | str|分享标题
| share_content | str|分享内容
# **获取回放弹幕**
... ...
... ... @@ -212,7 +212,8 @@ class LivingController extends BaseController
'living'=>$model->living,
'like_num'=>0,
'audience_num'=>0,//在线人数
'live_start_time'=>$model->starting_time,
'live_start_time'=>0,
'starting_time'=>$model->starting_time,//预告时间
'rtmp_downstream_address'=>'',
'flv_downstream_address'=>'',
'hls_downstream_address'=>'',
... ... @@ -243,11 +244,11 @@ class LivingController extends BaseController
]);
}
/*if ($model->videoRecording){
if ($model->videoRecording){
$ret = array_merge($ret,[
'live_start_time'=>(int)$model->videoRecording->live_start_time,
]);
}*/
}
if ($model->roomQchannel){
if (is_array($downstream_address = json_decode($model->roomQchannel->downstream_address)) && !empty($downstream_address[0])){
... ... @@ -329,7 +330,9 @@ class LivingController extends BaseController
$ret['background_pic'] = 'http://img11.static.yhbimg.com/global/2016/08/17/18/01f17a9cd44149052482e4ee58e590cf1b.png';
$ret['share_url'] = 'http://m.yohobuy.com/activity/live/replay/'.$room_id;
$ret['share_title'] = '分享标题';
$ret['share_content'] = '分享内容';
$dependency = new \yii\caching\DbDependency(['sql' => Yii::$app->db
->createCommand('SELECT update_time FROM {{%video}} WHERE id=:video_id')
->bindValue(':video_id', $video_id)
... ...