Show captions for non-english locales

This commit is contained in:
hunicus 2023-03-16 02:29:33 -04:00
parent 4c294b010d
commit c683a52a01
No known key found for this signature in database
GPG Key ID: 24837C51B6D81FD9
2 changed files with 4 additions and 9 deletions

View File

@ -14,9 +14,9 @@
</div> </div>
<video src="/resources/promo-video/mempool-promo.mp4" poster="/resources/promo-video/mempool-promo.jpg" controls loop playsinline [autoplay]="true" [muted]="true"> <video src="/resources/promo-video/mempool-promo.mp4" poster="/resources/promo-video/mempool-promo.jpg" controls loop playsinline [autoplay]="true" [muted]="true">
<track label="English" kind="subtitles" srclang="en" src="/resources/promo-video/en.vtt" [default]="showSubtitles('en')"> <track label="English" kind="captions" srclang="en" src="/resources/promo-video/en.vtt" [attr.default]="showSubtitles('en') ? '' : null">
<track label="日本語" kind="subtitles" srclang="ja" src="/resources/promo-video/ja.vtt" [default]="showSubtitles('ja')"> <track label="日本語" kind="captions" srclang="ja" src="/resources/promo-video/ja.vtt" [attr.default]="showSubtitles('ja') ? '' : null">
<track label="Svenska" kind="subtitles" srclang="sv" src="/resources/promo-video/sv.vtt" [default]="showSubtitles('sv')"> <track label="Svenska" kind="captions" srclang="sv" src="/resources/promo-video/sv.vtt" [attr.default]="showSubtitles('sv') ? '' : null">
</video> </video>
<div class="enterprise-sponsor" id="enterprise-sponsors"> <div class="enterprise-sponsor" id="enterprise-sponsors">

View File

@ -92,11 +92,6 @@ export class AboutComponent implements OnInit {
} }
showSubtitles(language) { showSubtitles(language) {
console.log(this.locale); return ( this.locale.startsWith( language ) && !this.locale.startsWith('en') );
if( this.locale.startsWith( language ) ) {
return true;
} else {
return false;
}
} }
} }