mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-14 00:06:17 -08:00
update
This commit is contained in:
1 parent
4d73f41e38
commit
9cbfa63584
8 files changed
+20
-21
No files matched your search
@@ -738,11 +738,11 @@ var art = new Artplayer({
|
||||
quality: [
|
||||
{
|
||||
default: true,
|
||||
name: 'SD 480P',
|
||||
html: 'SD 480P',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
{
|
||||
name: 'HD 720P',
|
||||
html: 'HD 720P',
|
||||
url: '/assets/sample/video.mp4',
|
||||
},
|
||||
],
|
||||
|
||||
@@ -4,10 +4,10 @@ export default function quality(option) {
|
||||
const qualityDefault = qualityOption.find((item) => item.default) || qualityOption[0];
|
||||
return {
|
||||
...option,
|
||||
html: qualityDefault ? qualityDefault.name : '',
|
||||
html: qualityDefault ? qualityDefault.html : '',
|
||||
selector: qualityOption,
|
||||
onSelect(item) {
|
||||
art.player.switchQuality(item.url, item.name);
|
||||
art.player.switchQuality(item.url, item.html);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,8 +8,8 @@ export default class Notice {
|
||||
}
|
||||
|
||||
set show(msg) {
|
||||
if (!msg) return removeClass($player, 'art-notice-show');
|
||||
const { $player, $noticeInner } = this.art.template;
|
||||
if (!msg) return removeClass($player, 'art-notice-show');
|
||||
$noticeInner.innerText = msg instanceof Error ? msg.message.trim() : msg;
|
||||
addClass($player, 'art-notice-show');
|
||||
clearTimeout(this.timer);
|
||||
|
||||
@@ -18,10 +18,10 @@ export default function switchMix(art, player) {
|
||||
if (playing) {
|
||||
player.play();
|
||||
}
|
||||
if (name) {
|
||||
notice.show = `${i18n.get('Switch video')}: ${name}`;
|
||||
}
|
||||
});
|
||||
if (name) {
|
||||
notice.show = `${i18n.get('Switch video')}: ${name}`;
|
||||
}
|
||||
art.emit('switch', url);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
quality: [
|
||||
{
|
||||
default: `?${b}`,
|
||||
name: s,
|
||||
html: s,
|
||||
url: s,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user