Skip to content

Commit

Permalink
fix: ad icon is not visible on audio description track list element o…
Browse files Browse the repository at this point in the history
…n Safari
  • Loading branch information
gjanblaszczyk committed Apr 7, 2023
1 parent d26780e commit de1cc2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/css/components/_audio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
@extend .vjs-icon-audio;
}

.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder,
.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder {
vertical-align: middle;
display: inline-block;
margin-bottom: -0.1em;
}

// Mark a main-desc-menu-item (main + description) item with a trailing Audio Description icon
// Mark a main-desc-menu-item (main + description) or description item with a trailing Audio Description icon
.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before,
.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {
font-family: VideoJS;
content: " \f12e";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AudioTrackMenuItem extends MenuItem {
const el = super.createEl(type, props, attrs);
const parentSpan = el.querySelector('.vjs-menu-item-text');

if (this.options_.track.kind === 'main-desc') {
if (['main-desc', 'description'].indexOf(this.options_.track.kind) >= 0) {
parentSpan.appendChild(Dom.createEl('span', {
className: 'vjs-icon-placeholder'
}, {
Expand Down

0 comments on commit de1cc2d

Please sign in to comment.