File tree Expand file tree Collapse file tree
src/layouts/default/PlayerOSD Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -530,18 +530,13 @@ const onTouchEnd = (event: TouchEvent) => {
530530 if (hasGroupPopout .value ) {
531531 toggleGroupPopout ();
532532 } else {
533- // Single player: tap before/after handle for volume up/down
533+ // Single player: jump to the tapped position (absolute), matching the
534+ // desktop click behaviour instead of stepping volume up/down.
534535 const touch = event .changedTouches [0 ];
535- const thumb = sliderContainerRef .value ?.querySelector (" [role=slider]" );
536- if (thumb ) {
537- const thumbRect = thumb .getBoundingClientRect ();
538- const thumbCenter = thumbRect .left + thumbRect .width / 2 ;
539- if (touch .clientX > thumbCenter ) {
540- volumeUp ();
541- } else {
542- volumeDown ();
543- }
544- }
536+ const finalValue = getPercentageFromX (touch .clientX );
537+ displayValue .value = finalValue ;
538+ emit (" update:local-value" , finalValue );
539+ setVolume (finalValue );
545540 }
546541 } else {
547542 // Drag end: send the final absolute value to the server
You can’t perform that action at this time.
0 commit comments