mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-12 06:26:16 -08:00
Update switchMix.js
This commit is contained in:
1 parent
2fbacf77a6
commit
8ad6550d12
1 file changed
+3
-3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user