mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
简化工具函数
This commit is contained in:
1 parent
be4d1d0437
commit
1270167a3e
26 files changed
+182
-152
No files matched your search
@@ -1,7 +1,9 @@
|
||||
import { def } from '../utils';
|
||||
|
||||
export default function switchMix(art, player) {
|
||||
const { i18n, notice, option } = art;
|
||||
|
||||
Object.defineProperty(player, 'switchQuality', {
|
||||
def(player, 'switchQuality', {
|
||||
value: (url, name) => {
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
@@ -26,7 +28,7 @@ export default function switchMix(art, player) {
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'switchUrl', {
|
||||
def(player, 'switchUrl', {
|
||||
value: (url, name) => {
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
|
||||
Reference in new issue
Block a user