add Artplayer.LOG_VERSION

This commit is contained in:
Harvey Zack committed 2023-08-22 20:51:39 +08:00
1 parent 3179d1241e
commit 894a9db1d7
34 files changed
+182 -136

No files matched your search

+3 -3
View File
@@ -18,12 +18,12 @@ export default function thumbnails(options) {
function showThumbnails(event) {
const { width: posWidth } = getPosFromEvent(art, event);
const { url, number, column, width, height } = option.thumbnails;
const width2 = width || image.naturalWidth / column;
const height2 = height || width2 / ($video.videoWidth / $video.videoHeight);
const width2 = width ?? image.naturalWidth / column;
const height2 = height ?? width2 / ($video.videoWidth / $video.videoHeight);
const perWidth = $progress.clientWidth / number;
const perIndex = Math.floor(posWidth / perWidth);
const yIndex = Math.ceil(perIndex / column) - 1;
const xIndex = perIndex % column || column - 1;
const xIndex = perIndex % column ?? column - 1;
setStyle($control, 'backgroundImage', `url(${url})`);
setStyle($control, 'height', `${height2}px`);
setStyle($control, 'width', `${width2}px`);
+1 -1
View File
@@ -22,7 +22,7 @@ export default function volume(option) {
}
function update() {
if (art.muted || art.volume === 0) {
if (art.muted ?? art.volume === 0) {
setStyle($volume, 'display', 'none');
setStyle($close, 'display', 'flex');
setStyle($indicator, 'top', '100%');