mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
fix(precise-volume): replace constructor check for volume slider (#3362)
This commit is contained in:
@ -155,9 +155,9 @@ export const onPlayerApiReady = async (
|
|||||||
function setupSliderObserver() {
|
function setupSliderObserver() {
|
||||||
const sliderObserver = new MutationObserver((mutations) => {
|
const sliderObserver = new MutationObserver((mutations) => {
|
||||||
for (const mutation of mutations) {
|
for (const mutation of mutations) {
|
||||||
if (mutation.target instanceof HTMLInputElement) {
|
if (mutation.target.nodeName === 'TP-YT-PAPER-SLIDER') {
|
||||||
// This checks that volume-slider was manually set
|
// This checks that volume-slider was manually set
|
||||||
const target = mutation.target;
|
const target = mutation.target as HTMLInputElement;
|
||||||
const targetValueNumeric = Number(target.value);
|
const targetValueNumeric = Number(target.value);
|
||||||
if (
|
if (
|
||||||
mutation.oldValue !== target.value &&
|
mutation.oldValue !== target.value &&
|
||||||
|
|||||||
Reference in New Issue
Block a user