dever 6 gadi atpakaļ
vecāks
revīzija
173fc45442
2 mainītis faili ar 65 papildinājumiem un 5 dzēšanām
  1. 60 0
      live/database/info.php
  2. 5 5
      live/lib/Qiniu.php

+ 60 - 0
live/database/info.php

@@ -81,6 +81,66 @@ return array
             'list'      => true,
         ),
 
+        'domain_publish'      => array
+        (
+            'type'      => 'varchar-200',
+            'name'      => '推流域名',
+            'default'   => '',
+            'desc'      => '推流域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            //'search'    => 'fulltext',
+            //'list'      => true,
+        ),
+
+        'domain_live_rtmp'      => array
+        (
+            'type'      => 'varchar-200',
+            'name'      => '高清直播域名',
+            'default'   => '',
+            'desc'      => '高清直播域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            //'search'    => 'fulltext',
+            //'list'      => true,
+        ),
+
+        'domain_live_hls'      => array
+        (
+            'type'      => 'varchar-200',
+            'name'      => '标清直播域名',
+            'default'   => '',
+            'desc'      => '标清直播域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            //'search'    => 'fulltext',
+            //'list'      => true,
+        ),
+
+        'domain_live_hdl'      => array
+        (
+            'type'      => 'varchar-200',
+            'name'      => '普清直播域名',
+            'default'   => '',
+            'desc'      => '普清直播域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            //'search'    => 'fulltext',
+            //'list'      => true,
+        ),
+
+        'domain_live_pic'      => array
+        (
+            'type'      => 'varchar-200',
+            'name'      => '直播截图域名',
+            'default'   => '',
+            'desc'      => '直播截图域名',
+            'match'     => 'is_string',
+            'update'    => 'text',
+            //'search'    => 'fulltext',
+            //'list'      => true,
+        ),
+
         'state'     => array
         (
             'type'      => 'tinyint-1',

+ 5 - 5
live/lib/Qiniu.php

@@ -114,7 +114,7 @@ class Qiniu
     # 获取推流地址
     public function getRtmp($name, $time = 3600)
     {
-        $url = \Qiniu\Pili\RTMPPublishURL("publish-rtmp.test.com", $this->config['space'], $name, 3600, $this->config['appkey'], $this->config['appsecret']);
+        $url = \Qiniu\Pili\RTMPPublishURL($this->config['domain_publish'], $this->config['space'], $name, 3600, $this->config['appkey'], $this->config['appsecret']);
         return $url;
     }
 
@@ -132,28 +132,28 @@ class Qiniu
     # 获取直播地址
     public function getRtmpPlay($name)
     {
-        $url = \Qiniu\Pili\RTMPPlayURL("live-rtmp.test.com", $this->config['space'], $name);
+        $url = \Qiniu\Pili\RTMPPlayURL($this->config['domain_live_rtmp'], $this->config['space'], $name);
         return $url;
     }
 
     # HLS 直播地址
     public function getHlsPlay($name)
     {
-        $url = \Qiniu\Pili\HLSPlayURL("live-hls.test.com", $this->config['space'], $name);
+        $url = \Qiniu\Pili\HLSPlayURL($this->config['domain_live_hls'], $this->config['space'], $name);
         return $url;
     }
 
     # HDL 直播地址
     public function getHdlPlay($name)
     {
-        $url = \Qiniu\Pili\HDLPlayURL("live-hdl.test.com", $this->config['space'], $name);
+        $url = \Qiniu\Pili\HDLPlayURL($this->config['domain_live_hdl'], $this->config['space'], $name);
         return $url;
     }
 
     # 截图直播地址
     public function getPicPlay($name)
     {
-        $url = \Qiniu\Pili\SnapshotPlayURL("live-snapshot.test.com", $this->config['space'], $name);
+        $url = \Qiniu\Pili\SnapshotPlayURL($this->config['domain_live_pic'], $this->config['space'], $name);
         return $url;
     }
 }