mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
修改本地预览插件
This commit is contained in:
1 parent
7c5d0f7385
commit
042745f001
15 files changed
+296
-129
No files matched your search
@@ -1,10 +1,10 @@
|
||||
export default function switchMix(art, player) {
|
||||
const { i18n, notice, option, template } = art;
|
||||
const { i18n, notice, option } = art;
|
||||
|
||||
Object.defineProperty(player, 'switchQuality', {
|
||||
value: (url, name = 'unknown') => {
|
||||
if (url !== template.$video.src) {
|
||||
URL.revokeObjectURL(template.$video.src);
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
const { currentTime, playing } = player;
|
||||
return player.attachUrl(url).then(() => {
|
||||
option.url = url;
|
||||
@@ -26,8 +26,8 @@ export default function switchMix(art, player) {
|
||||
|
||||
Object.defineProperty(player, 'switchUrl', {
|
||||
value: (url, name = 'unknown') => {
|
||||
if (url !== template.$video.src) {
|
||||
URL.revokeObjectURL(template.$video.src);
|
||||
if (url !== player.url) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
const { playing } = player;
|
||||
return player.attachUrl(url).then(() => {
|
||||
option.url = url;
|
||||
|
||||
Reference in new issue
Block a user