From 4b644cd8882095c90d5ae7810a61c93359fd94f0 Mon Sep 17 00:00:00 2001 From: harry Date: Wed, 4 Mar 2020 00:52:12 +0800 Subject: [PATCH] =?UTF-8?q?webpack=20=E6=9E=84=E5=BB=BAflv.js=20=E6=8A=A5?= =?UTF-8?q?=E9=94=99=EF=BC=8C=E4=BC=B0=E8=AE=A1=E6=98=AFwebpack=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=87=E4=BD=8E=EF=BC=8C=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?typescript=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/index.html | 162 ++++++++++++++++++ .../Video/video-play => public/js}/flv.min.js | 0 .../courses/Video/video-play/flv-player.jsx | 5 +- 3 files changed, 164 insertions(+), 3 deletions(-) rename public/react/{src/modules/courses/Video/video-play => public/js}/flv.min.js (100%) diff --git a/public/react/public/index.html b/public/react/public/index.html index 976791e90..ddf1ed4a9 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -16,6 +16,7 @@ Content=”EduCoder翻转课堂教学模式,颠覆了传统教学模式,让教师与学生的关系由“权威”变成了“伙伴”。将学习的主动权转交给学生,使学生可个性化化学,学生的学习主体得到了彰显。”> +<<<<<<< HEAD @@ -105,6 +106,20 @@ + + + + + + + + + + + +<<<<<<< HEAD +======= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +>>>>>>> dc8805b... webpack 构建flv.js 报错,估计是webpack版本过低,不支持typescript等 \ No newline at end of file diff --git a/public/react/src/modules/courses/Video/video-play/flv.min.js b/public/react/public/js/flv.min.js similarity index 100% rename from public/react/src/modules/courses/Video/video-play/flv.min.js rename to public/react/public/js/flv.min.js diff --git a/public/react/src/modules/courses/Video/video-play/flv-player.jsx b/public/react/src/modules/courses/Video/video-play/flv-player.jsx index e01f9fb31..bbb762762 100644 --- a/public/react/src/modules/courses/Video/video-play/flv-player.jsx +++ b/public/react/src/modules/courses/Video/video-play/flv-player.jsx @@ -1,13 +1,12 @@ import React, { useEffect, useRef } from 'react' -import Flv from './flv.min.js' export default ({ url }) => { const ref = useRef() useEffect(() => { let player = null - if (Flv.isSupported) { - player = Flv.createPlayer({ + if (window.flvjs.isSupported) { + player = window.flvjs.createPlayer({ type: 'flv', volume: 0.8, url,