实体化HlsJsPlayer,而非更底层一点的Hls

This commit is contained in:
haiyangcui
2020-11-15 16:05:08 +01:00
parent d116f08550
commit 18db5a1eb0
2 changed files with 5 additions and 5 deletions

View File

@@ -177,7 +177,7 @@ import { mapMutations } from 'vuex'
import { star, history, setting, shortcut, mini, iptv, sites } from '../lib/dexie'
import zy from '../lib/site/tools'
import Player from 'xgplayer'
import Hls from 'xgplayer-hls.js'
import HlsJsPlayer from 'xgplayer-hls.js'
import mt from 'mousetrap'
import { directive as onClickaway } from 'vue-clickaway'
import { exec, execFile } from 'child_process'
@@ -1187,7 +1187,7 @@ export default {
this.right.list = []
this.getAllhistory()
setTimeout(() => {
this.xg = new Hls(this.config)
this.xg = new HlsJsPlayer(this.config)
this.playerInstall()
this.bindEvent()
}, 1000)
@@ -1248,7 +1248,7 @@ export default {
},
mounted () {
this.playerInstall()
this.xg = new Hls(this.config)
this.xg = new HlsJsPlayer(this.config)
ipcRenderer.on('miniClosed', async () => {
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
if (db) {

View File

@@ -46,7 +46,7 @@ import zy from '../lib/site/tools'
import { history, setting, shortcut, mini } from '../lib/dexie'
import mt from 'mousetrap'
import 'xgplayer'
import Hls from 'xgplayer-hls.js'
import HlsJsPlayer from 'xgplayer-hls.js'
const { remote, ipcRenderer } = require('electron')
const VIDEO_DETAIL_CACHE = {}
export default {
@@ -400,7 +400,7 @@ export default {
}
},
mounted () {
this.xg = new Hls(this.config)
this.xg = new HlsJsPlayer(this.config)
this.mtEvent()
this.getUrls()
},