rabin 7 年之前
父節點
當前提交
8debc2798e
共有 1 個文件被更改,包括 14 次插入2 次删除
  1. 14 2
      content/v1/Video.php

+ 14 - 2
content/v1/Video.php

@@ -7,11 +7,23 @@ use Dever;
 class Video
 class Video
 {
 {
     # 从腾讯视频中解析mp4
     # 从腾讯视频中解析mp4
-    public function html_api($link)
+    public function show_api($link)
     {
     {
         $link = $this->mp4_api($link);
         $link = $this->mp4_api($link);
 
 
-        $html = '<video controls="controls" width="200" src="'.$link.'">您的浏览器不支持视频播放</video>';
+        $html = '<video controls="controls" width="500" src="'.$link.'">您的浏览器不支持视频播放</video>';
+
+        return $html;
+    }
+
+    # 从腾讯视频中解析mp4
+    public function html_api($link)
+    {
+        $url = Dever::url('content/v1/video.show?link=' . $link);
+        $html = '<a href="#dever_modal" data-toggle="modal" onclick="$.get(\''.$url.'\', function(t)
+        {
+            $(\'#dever_modal_body\').html(t);
+        })">点此播放</a><div style="display:none;">测试</div>';
 
 
         return $html;
         return $html;