This commit is contained in:
zhw2590582 committed 2021-11-28 14:31:26 +08:00
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',
},
],
+2 -2
View File
@@ -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);
},
};
};
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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);
}
+1 -1
View File
@@ -77,7 +77,7 @@ export default {
quality: [
{
default: `?${b}`,
name: s,
html: s,
url: s,
},
],