From dc8805bccc6192ae08df96bc146c4e29e0f411ac 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 | 329 ++++++++---------- .../Video/video-play => public/js}/flv.min.js | 0 .../courses/Video/video-play/flv-player.jsx | 5 +- 3 files changed, 154 insertions(+), 180 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 38fd550ab..d32dbceb0 100755 --- a/public/react/public/index.html +++ b/public/react/public/index.html @@ -1,34 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - + - + - + - + - + - + - - + - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - + + + + - - - - - - - - - - + + + + + + + + + + \ 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,