dever 6 роки тому
батько
коміт
e22f6ef20b
1 змінених файлів з 5 додано та 11 видалено
  1. 5 11
      live/lib/Qiniu.php

+ 5 - 11
live/lib/Qiniu.php

@@ -114,8 +114,7 @@ class Qiniu
     # 获取推流地址
     public function getRtmp($name, $time = 3600)
     {
-        $stream = $this->get($name);
-        $url = $stream->RTMPPublishURL($this->config['domain_publish'], $this->config['space'], $name, $time, $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;
     }
 
@@ -133,33 +132,28 @@ class Qiniu
     # 获取直播地址
     public function getRtmpPlay($name)
     {
-        $stream = $this->get($name);
-        //\Qiniu\Pili\RTMPPlayURL
-        $url = $stream->RTMPPlayURL($this->config['domain_live_rtmp'], $this->config['space'], $name);
+        $url = \Qiniu\Pili\RTMPPlayURL($this->config['domain_live_rtmp'], $this->config['space'], $name);
         return $url;
     }
 
     # HLS 直播地址
     public function getHlsPlay($name)
     {
-        $stream = $this->get($name);
-        $url = $stream->HLSPlayURL($this->config['domain_live_hls'], $this->config['space'], $name);
+        $url = \Qiniu\Pili\HLSPlayURL($this->config['domain_live_hls'], $this->config['space'], $name);
         return $url;
     }
 
     # HDL 直播地址
     public function getHdlPlay($name)
     {
-        $stream = $this->get($name);
-        $url = $stream->HDLPlayURL($this->config['domain_live_hdl'], $this->config['space'], $name);
+        $url = \Qiniu\Pili\HDLPlayURL($this->config['domain_live_hdl'], $this->config['space'], $name);
         return $url;
     }
 
     # 截图直播地址
     public function getPicPlay($name)
     {
-        $stream = $this->get($name);
-        $url = $stream->SnapshotPlayURL($this->config['domain_live_pic'], $this->config['space'], $name);
+        $url = \Qiniu\Pili\SnapshotPlayURL($this->config['domain_live_pic'], $this->config['space'], $name);
         return $url;
     }
 }