Improve mobile UI and fix Media Session and API settings bugs
This commit is contained in:
parent
99f2ccfdb2
commit
31862a835d
3 changed files with 9 additions and 1 deletions
|
|
@ -37,6 +37,11 @@ export function initializePlayerEvents(player, audioPlayer, scrobbler) {
|
||||||
updateTabTitle(player);
|
updateTabTitle(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
audioPlayer.addEventListener('playing', () => {
|
||||||
|
player.updateMediaSessionPlaybackState();
|
||||||
|
player.updateMediaSessionPositionState();
|
||||||
|
});
|
||||||
|
|
||||||
audioPlayer.addEventListener('pause', () => {
|
audioPlayer.addEventListener('pause', () => {
|
||||||
playPauseBtn.innerHTML = SVG_PLAY;
|
playPauseBtn.innerHTML = SVG_PLAY;
|
||||||
player.updateMediaSessionPlaybackState();
|
player.updateMediaSessionPlaybackState();
|
||||||
|
|
|
||||||
2
js/ui.js
2
js/ui.js
|
|
@ -725,7 +725,7 @@ async renderPlaylistPage(playlistId) {
|
||||||
container.innerHTML = instances.map((url, index) => {
|
container.innerHTML = instances.map((url, index) => {
|
||||||
const speedInfo = speeds[url];
|
const speedInfo = speeds[url];
|
||||||
const speedText = speedInfo
|
const speedText = speedInfo
|
||||||
? (speedInfo.speed === Infinity
|
? (speedInfo.speed === Infinity || typeof speedInfo.speed !== 'number'
|
||||||
? `<span style="color: var(--muted-foreground); font-size: 0.8rem;">Failed</span>`
|
? `<span style="color: var(--muted-foreground); font-size: 0.8rem;">Failed</span>`
|
||||||
: `<span style="color: var(--muted-foreground); font-size: 0.8rem;">${speedInfo.speed.toFixed(0)}ms</span>`)
|
: `<span style="color: var(--muted-foreground); font-size: 0.8rem;">${speedInfo.speed.toFixed(0)}ms</span>`)
|
||||||
: '';
|
: '';
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
|
|
@ -869,6 +870,7 @@ body.has-page-background .track-item:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all var(--transition);
|
transition: all var(--transition);
|
||||||
box-shadow: var(--shadow-sm);
|
box-shadow: var(--shadow-sm);
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
|
|
@ -1088,6 +1090,7 @@ input:checked + .slider::before {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-controls .buttons button:hover {
|
.player-controls .buttons button:hover {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue