Skip to content

Commit

Permalink
feat(cxl-ui): cxl-jw-player remove empty tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
anoblet committed Oct 2, 2024
1 parent 3143869 commit dad295a
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/cxl-ui/src/components/cxl-jw-player/index.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ export const template = function () {
<div class="captions padding scroll">
${this._tracks.map(
(track, index) =>
html`${track.isChapter
? html`<h2 @click=${this._onCaptionClick} data-index=${index}>
${track.data.text}
</h2>`
: html`
<span
@click=${this._onCaptionClick}
?active=${this._currentTrack === index}
data-index=${index}
>
${track.data.text}
</span>
`}`
html`${track.data.text
? html`${track.isChapter
? html`<h2 @click=${this._onCaptionClick} data-index=${index}>
${track.data.text}
</h2>`
: html`
<span
@click=${this._onCaptionClick}
?active=${this._currentTrack === index}
data-index=${index}
>
${track.data.text}
</span>
`}`
: nothing}`
)}
</div>
`
Expand Down

0 comments on commit dad295a

Please sign in to comment.