dever há 6 anos atrás
pai
commit
b0e332a80e
4 ficheiros alterados com 21 adições e 2 exclusões
  1. 12 0
      live/database/info.php
  2. 1 1
      live/lib/Handle.php
  3. 2 1
      live/lib/Qiniu.php
  4. 6 0
      live/src/Api.php

+ 12 - 0
live/database/info.php

@@ -46,6 +46,18 @@ return array
             'search'    => 'select',
         ),
 
+        'host'      => array
+        (
+            'type'      => 'varchar-800',
+            'name'      => '存储空间域名',
+            'default'   => '',
+            'desc'      => '存储空间域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            'search'    => 'fulltext',
+            'list'      => true,
+        ),
+
         'space'      => array
         (
             'type'      => 'varchar-300',

+ 1 - 1
live/lib/Handle.php

@@ -39,7 +39,7 @@ class Handle
         $config = Dever::db('live/info')->one($info['live_id']);
         $method = $this->method($config);
 
-        $data['url_vod'] = $method->save($info['key']);
+        $data['url_vod'] = $config['host'] . $method->save($info['key']);
         $data['where_id'] = $info['id'];
         $data['status'] = 3;
 

+ 2 - 1
live/lib/Qiniu.php

@@ -87,7 +87,8 @@ class Qiniu
     {
         $stream = $this->get($name);
         //$format = array("format" => "mp4");
-        return $stream->saveas($format, $start, $end);
+        //return $stream->saveas($format, $start, $end);
+        return $stream->save(0, time());
     }
 
     # 保存直播截图

+ 6 - 0
live/src/Api.php

@@ -38,6 +38,9 @@ class Api
     {
         $this->check();
         $id = Dever::input('id');
+        if (!$id) {
+        	Dever::alert('错误的id');
+        }
         $handle = new Handle();
         $handle->startLive($id);
 
@@ -49,6 +52,9 @@ class Api
     {
         $this->check();
         $id = Dever::input('id');
+        if (!$id) {
+        	Dever::alert('错误的id');
+        }
         $handle = new Handle();
         $handle->save($id);