mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
修复切换画质bug
This commit is contained in:
1 parent
d4b9fc4d29
commit
88533c1023
8 files changed
+116
-138
No files matched your search
+12
-20
@@ -1109,13 +1109,13 @@
|
||||
var $video = art.refs.$video,
|
||||
i18n = art.i18n,
|
||||
notice = art.notice,
|
||||
isPlaying = art.isPlaying,
|
||||
option = art.option;
|
||||
Object.defineProperty(player, 'switch', {
|
||||
Object.defineProperty(player, 'switchQuality', {
|
||||
value: function value(url) {
|
||||
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'unknown';
|
||||
|
||||
if (url !== option.url) {
|
||||
var isPlaying = art.isPlaying;
|
||||
var currentTime = player.currentTime;
|
||||
art.emit('beforeMountUrl', url);
|
||||
$video.src = player.mountUrl(url);
|
||||
@@ -2893,15 +2893,6 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
Object.defineProperty(player, 'pipToggle', {
|
||||
value: function value() {
|
||||
if (player.pipState) {
|
||||
player.pipExit();
|
||||
} else {
|
||||
player.pipEnabled();
|
||||
}
|
||||
}
|
||||
});
|
||||
proxy($video, 'enterpictureinpicture', function () {
|
||||
art.emit('pipEnabled');
|
||||
});
|
||||
@@ -2976,6 +2967,15 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function pipMix(art, player) {
|
||||
if (document.pictureInPictureEnabled) {
|
||||
nativePip(art, player);
|
||||
} else {
|
||||
customPip(art, player);
|
||||
}
|
||||
|
||||
Object.defineProperty(player, 'pipToggle', {
|
||||
value: function value() {
|
||||
if (player.pipState) {
|
||||
@@ -2987,14 +2987,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
function pipMix(art, player) {
|
||||
if (document.pictureInPictureEnabled) {
|
||||
nativePip(art, player);
|
||||
} else {
|
||||
customPip(art, player);
|
||||
}
|
||||
}
|
||||
|
||||
function seekMix$1(art, player) {
|
||||
Object.defineProperty(player, 'loaded', {
|
||||
get: function get() {
|
||||
@@ -3843,7 +3835,7 @@
|
||||
name = _option$quality$index.name;
|
||||
|
||||
if (url && name && _this.playIndex !== index) {
|
||||
player.switch(url, name);
|
||||
player.switchQuality(url, name);
|
||||
$qualityName.innerHTML = name;
|
||||
_this.playIndex = index;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user