Skip to content

Commit

Permalink
Add IDs to identify player from scrobbler
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyfran committed Oct 22, 2024
1 parent d3d3650 commit 617f69e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/components/player/src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,19 @@ export class EchoPlayer extends LitElement {
trackName: string,
) {
return html`
<div class="current-track">
<div id="player" class="current-track">
${Option.isSome(cover)
? html` <img
id="current-track-cover"
src="${URL.createObjectURL(cover.value)}"
height="40"
width="40"
alt="Album cover"
/>`
: nothing}
<div class="track-info">
<h4>${trackName}</h4>
<h6>${artistName}</h6>
<h4 id="track-name">${trackName}</h4>
<h6 id="artist-name">${artistName}</h6>
</div>
${player.status._tag !== "Stopped"
? html`
Expand All @@ -132,8 +133,8 @@ export class EchoPlayer extends LitElement {
@click=${this._onTogglePlayback}
>
${player.status._tag === "Paused"
? html` <play-icon></play-icon> `
: html` <pause-icon></pause-icon> `}
? html` <play-icon id="play"></play-icon> `
: html` <pause-icon id="pause"></pause-icon> `}
</echo-button>
<echo-button
.type=${ButtonType.Icon}
Expand Down

0 comments on commit 617f69e

Please sign in to comment.