mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-09 17:08:58 -05:00
fix: switch the play icons to the correct way
This commit is contained in:
parent
6224738198
commit
e095d68667
@ -38,9 +38,9 @@ class AutoplayToggleButton extends Button {
|
|||||||
|
|
||||||
// Set initial icon state directly
|
// Set initial icon state directly
|
||||||
if (this.isAutoplayEnabled) {
|
if (this.isAutoplayEnabled) {
|
||||||
this.iconSpan.innerHTML = `<img src="${autoPlayIconUrl}" alt="Autoplay on" style="width: 26px; height: 26px;" />`;
|
this.iconSpan.innerHTML = `<img src="${autoPauseIconUrl}" alt="Autoplay on" style="width: 26px; height: 26px;" />`;
|
||||||
} else {
|
} else {
|
||||||
this.iconSpan.innerHTML = `<img src="${autoPauseIconUrl}" alt="Autoplay off" style="width: 26px; height: 26px;" />`;
|
this.iconSpan.innerHTML = `<img src="${autoPlayIconUrl}" alt="Autoplay off" style="width: 26px; height: 26px;" />`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create control text span
|
// Create control text span
|
||||||
@ -67,7 +67,7 @@ class AutoplayToggleButton extends Button {
|
|||||||
// After fade-out complete, update innerHTML and fade back in
|
// After fade-out complete, update innerHTML and fade back in
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.isAutoplayEnabled) {
|
if (this.isAutoplayEnabled) {
|
||||||
this.iconSpan.innerHTML = `<img src="${autoPlayIconUrl}" alt="Autoplay on" style="width: 26px; height: 26px;" />`;
|
this.iconSpan.innerHTML = `<img src="${autoPauseIconUrl}" alt="Autoplay on" style="width: 26px; height: 26px;" />`;
|
||||||
if (this.el()) {
|
if (this.el()) {
|
||||||
this.el().title = 'Autoplay is on';
|
this.el().title = 'Autoplay is on';
|
||||||
this.el().setAttribute('aria-label', 'Autoplay is on');
|
this.el().setAttribute('aria-label', 'Autoplay is on');
|
||||||
@ -75,7 +75,7 @@ class AutoplayToggleButton extends Button {
|
|||||||
if (controlText) controlText.textContent = 'Autoplay is on';
|
if (controlText) controlText.textContent = 'Autoplay is on';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.iconSpan.innerHTML = `<img src="${autoPauseIconUrl}" alt="Autoplay off" style="width: 26px; height: 26px;" />`;
|
this.iconSpan.innerHTML = `<img src="${autoPlayIconUrl}" alt="Autoplay off" style="width: 26px; height: 26px;" />`;
|
||||||
if (this.el()) {
|
if (this.el()) {
|
||||||
this.el().title = 'Autoplay is off';
|
this.el().title = 'Autoplay is off';
|
||||||
this.el().setAttribute('aria-label', 'Autoplay is off');
|
this.el().setAttribute('aria-label', 'Autoplay is off');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user