rabin 7 tahun lalu
induk
melakukan
8debc2798e
1 mengubah file dengan 14 tambahan dan 2 penghapusan
  1. 14 2
      content/v1/Video.php

+ 14 - 2
content/v1/Video.php

@@ -7,11 +7,23 @@ use Dever;
 class Video
 {
     # 从腾讯视频中解析mp4
-    public function html_api($link)
+    public function show_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;