mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
Show captions for non-english locales
This commit is contained in:
parent
4c294b010d
commit
c683a52a01
@ -14,9 +14,9 @@
|
||||
</div>
|
||||
|
||||
<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="日本語" kind="subtitles" srclang="ja" src="/resources/promo-video/ja.vtt" [default]="showSubtitles('ja')">
|
||||
<track label="Svenska" kind="subtitles" srclang="sv" src="/resources/promo-video/sv.vtt" [default]="showSubtitles('sv')">
|
||||
<track label="English" kind="captions" srclang="en" src="/resources/promo-video/en.vtt" [attr.default]="showSubtitles('en') ? '' : null">
|
||||
<track label="日本語" kind="captions" srclang="ja" src="/resources/promo-video/ja.vtt" [attr.default]="showSubtitles('ja') ? '' : null">
|
||||
<track label="Svenska" kind="captions" srclang="sv" src="/resources/promo-video/sv.vtt" [attr.default]="showSubtitles('sv') ? '' : null">
|
||||
</video>
|
||||
|
||||
<div class="enterprise-sponsor" id="enterprise-sponsors">
|
||||
|
@ -92,11 +92,6 @@ export class AboutComponent implements OnInit {
|
||||
}
|
||||
|
||||
showSubtitles(language) {
|
||||
console.log(this.locale);
|
||||
if( this.locale.startsWith( language ) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return ( this.locale.startsWith( language ) && !this.locale.startsWith('en') );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user