From b01721ab8a824f4a144ce55a8de6767bbe3f5d0a Mon Sep 17 00:00:00 2001
From: xc <double72cheng@gmail.com>
Date: Fri, 23 Apr 2021 17:01:09 +0800
Subject: [PATCH] 直播流组件 init

---
 src/main/resources/public/js/live/livepler.js |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/public/js/live/livepler.js b/src/main/resources/public/js/live/livepler.js
index 37ee9a4..4f20afe 100755
--- a/src/main/resources/public/js/live/livepler.js
+++ b/src/main/resources/public/js/live/livepler.js
@@ -1,5 +1,35 @@
-!(function () {
+;!(function () {
+    window.onkeydown = function () {
+        h5lc.fullscreen = false
+    }
+
+    let _content = $("<div class=\"content\">\n" +
+        "        <div class=\"player\" onmouseover=\"$('.player .control').css('display', 'block')\" onmouseout=\"$('.player .control').css('display', 'none')\">\n" +
+        "            <div class=\"player-wrapper\" id=\"container\" style=\"background-color: #0D0E1B;\">\n" +
+        "            </div>\n" +
+        "            <div class=\"control\">\n" +
+        "                <div class=\"fa fa-play\" id=\"play\"></div>\n" +
+        "                <div class=\"fa fa-stop\" id=\"stop\" style=\"display: none\"></div>\n" +
+        "                <div class=\"timer\">\n" +
+        "                    <span class=\"progress_timer\">00:00:00</span>\n" +
+        "                    <span class=\"duration_timer\">00:00:00</span>\n" +
+        "                </div>\n" +
+        "                <div class=\"fa fa-expand expand\" onclick=\"h5lc.fullscreen=true\"></div>\n" +
+        "            </div>\n" +
+        "        </div>\n" +
+        "    </div>");
+    $("#jessibucaContainer").append(_content);
 
 
+    function constructLive(opt) {
+        this._opt = opt;
+        if (typeof opt.container === "string") {
+            this._opt.container = document.getElementById(opt.container);
+        }
+        if (!this._opt.container) {
+            throw new Error('Jessibuca need container option');
+            return;
+        }
 
-})();
+}})()
+

--
Gitblit v1.9.1