mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
add Artplayer.LOG_VERSION
This commit is contained in:
1 parent
3179d1241e
commit
894a9db1d7
34 files changed
+182
-136
No files matched your search
@@ -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`);
|
||||
|
||||
@@ -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%');
|
||||
|
||||
Reference in new issue
Block a user