Update switchMix.js

This commit is contained in:
Harvey committed 2019-09-27 09:54:12 +08:00
1 parent 2fbacf77a6
commit 8ad6550d12
1 file changed
+3 -3
+3 -3
View File
@@ -1,9 +1,9 @@
export default function switchMix(art, player) {
const { i18n, notice, option } = art;
const { i18n, notice, option, template } = art;
Object.defineProperty(player, 'switchQuality', {
value: (url, name = 'unknown') => {
if (url !== option.url) {
if (url !== template.$video.src) {
const { currentTime, playing } = player;
return player.attachUrl(url).then(() => {
option.url = url;
@@ -25,7 +25,7 @@ export default function switchMix(art, player) {
Object.defineProperty(player, 'switchUrl', {
value: (url, name = 'unknown') => {
if (url !== option.url) {
if (url !== template.$video.src) {
const { playing } = player;
return player.attachUrl(url).then(() => {
option.url = url;