修改本地预览插件

This commit is contained in:
Harvey committed 2019-11-22 09:52:56 +08:00
1 parent 7c5d0f7385
commit 042745f001
15 files changed
+296 -129

No files matched your search

+5 -5
View File
@@ -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;