Commit 001877c3 by 潘建波

1>解决IE引入flv.js后无法显示网页问题

1 parent 00e7d150
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"commit": "git-cz" "commit": "git-cz"
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1",
"@svgdotjs/svg.js": "^3.0.16", "@svgdotjs/svg.js": "^3.0.16",
"@ztree/ztree_v3": "^3.5.46", "@ztree/ztree_v3": "^3.5.46",
"axios": "^0.19.0", "axios": "^0.19.0",
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
<script src="<%= BASE_URL %>zTree_v3/js/fuzzysearch.js"></script> <script src="<%= BASE_URL %>zTree_v3/js/fuzzysearch.js"></script>
<script src="<%= BASE_URL %>js/keymaster.js"></script> <script src="<%= BASE_URL %>js/keymaster.js"></script>
<script src="<%= BASE_URL %>js/config.js"></script> <script src="<%= BASE_URL %>js/config.js"></script>
<script src="<%= BASE_URL %>js/NodePlayer-full.min.js"></script> <script src="<%= BASE_URL %>js/flv.js"></script>
<!-- <script src="<%= BASE_URL %>js/NodePlayer-full.min.js"></script> -->
</head> </head>
<body id="theme-name"> <body id="theme-name">
<noscript> <noscript>
......
This diff could not be displayed because it is too large.
import 'babel-polyfill'
import Vue from "vue"; import Vue from "vue";
import App from "./App.vue"; import App from "./App.vue";
import ElementUI from "element-ui"; import ElementUI from "element-ui";
......
...@@ -2,20 +2,14 @@ ...@@ -2,20 +2,14 @@
<div class="ocxbox"> <div class="ocxbox">
<video id="flvvideo" autoplay style="width: 100%; height: 100%" class="fvideo"></video> <video id="flvvideo" autoplay style="width: 100%; height: 100%" class="fvideo"></video>
<div class="control" hidden> <div class="control" hidden>
<span
:class="{
videostatus: true,
'el-icon-video-play': videostatus,
'el-icon-video-pause': !videostatus,
}"
@click="controlvideo"
></span>
<!-- <span :class="{'el-icon-full-screen':!furllstatus,'el-icon-circle-close':furllstatus,'videostatus':true, 'full-icon':true}" @click="fullvideo" id="full"></span> --> <!-- <span :class="{'el-icon-full-screen':!furllstatus,'el-icon-circle-close':furllstatus,'videostatus':true, 'full-icon':true}" @click="fullvideo" id="full"></span> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import flv from "flv.js";
export default { export default {
data() { data() {
return { return {
...@@ -28,7 +22,7 @@ export default { ...@@ -28,7 +22,7 @@ export default {
computed: {}, computed: {},
methods: { methods: {
initflv() { initflv() {
if (flv.isSupported()) { if (flvjs.isSupported()) {
this.player = flv.createPlayer({ this.player = flv.createPlayer({
type: "flv", type: "flv",
}); });
...@@ -45,7 +39,7 @@ export default { ...@@ -45,7 +39,7 @@ export default {
// this.flv_destroy(); // this.flv_destroy();
// } // }
// } // }
this.player = flv.createPlayer({ this.player = flvjs.createPlayer({
type: "flv", type: "flv",
isLive: true, isLive: true,
hasAudio: false, hasAudio: false,
......
...@@ -9,6 +9,8 @@ module.exports = { ...@@ -9,6 +9,8 @@ module.exports = {
lintOnSave: false, lintOnSave: false,
publicPath: process.env.NODE_ENV === "production" ? "./" : "/", publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
// ... // ...
transpileDependencies: ['element-ui'], // 此段为增加配置选项
css: { css: {
loaderOptions: { loaderOptions: {
sass: { sass: {
...@@ -17,6 +19,7 @@ module.exports = { ...@@ -17,6 +19,7 @@ module.exports = {
} }
}, },
chainWebpack: config => { chainWebpack: config => {
config.entry('main').add('babel-polyfill')
if (process.env.use_analyzer) { if (process.env.use_analyzer) {
// 分析 // 分析
config config
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!