dever 6 years ago
parent
commit
fcbd6d4cfd
3 changed files with 14 additions and 3 deletions
  1. 10 0
      live/lib/Handle.php
  2. 1 1
      live/lib/Qiniu.php
  3. 3 2
      video/database/live.php

+ 10 - 0
live/lib/Handle.php

@@ -80,6 +80,10 @@ class Handle
         
         $method = $this->method($config);
 
+        $rtmp = $method->getRtmp($info['key'], $info['times'] * 3600);
+
+        $url = $method->getPlay($info['key']);
+
         $stream = $method->getInfo($info['key']);
 
         $live = $method->getLiveStatus($info['key']);
@@ -87,6 +91,12 @@ class Handle
         $hitory = $method->history($info['key']);
 
         $data['where_id'] = $id;
+        $data['live'] = $rtmp;
+        $data['url_rtmp'] = $url['rtmp'];
+        $data['url_hls'] = $url['hls'];
+        $data['url_hdl'] = $url['hdl'];
+        $data['url_pic'] = $url['pic'];
+        
         $live = Dever::json_decode($info['info']);
         $live['info'] = $stream;
         $live['live'] = $live;

+ 1 - 1
live/lib/Qiniu.php

@@ -114,7 +114,7 @@ class Qiniu
     # 获取推流地址
     public function getRtmp($name, $time = 3600)
     {
-        $url = \Qiniu\Pili\RTMPPublishURL($this->config['domain_publish'], $this->config['space'], $name, 3600, $this->config['appkey'], $this->config['appsecret']);
+        $url = \Qiniu\Pili\RTMPPublishURL($this->config['domain_publish'], $this->config['space'], $name, $time, $this->config['appkey'], $this->config['appsecret']);
         return $url;
     }
 

+ 3 - 2
video/database/live.php

@@ -4,6 +4,7 @@ $page = 15;
 $audit = Dever::config('base')->audit;
 $status = Dever::config('base')->status;
 $function = Dever::config('base')->function;
+unset($function[3]);
 $share = function()
 {
 	$array = array();
@@ -198,7 +199,7 @@ return array
 			'default' 	=> '0',
 			'desc' 		=> '喜欢基数',
 			'match' 	=> 'option',
-			'update'	=> 'text',
+			//'update'	=> 'text',
 		),
 		
 		'num_up'		=> array
@@ -209,7 +210,7 @@ return array
 			'desc' 		=> '请填写喜欢数',
 			'match' 	=> 'option',
 			//'search'	=> 'order',
-			'list'		=> '"在线人数:{num_user}+{num_add_user}<br />喜欢数:{num_up}+{num_add_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list'		=> '"在线人数:{num_user}+{num_add_user}<br />喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
 			'list_name'	=> '统计数字',
 		),