VideoTrack: language プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

VideoTracklanguage プロパティは読み取り専用で、映像トラックで使用されている言語を識別する文字列を返します。

複数の言語を含むトラック(他の言語で数行が話されている英語の映画など)の場合は、これが動画の主要言語になります。

映像トラックで使用される主要言語の BCP 47 (RFC 5646) 形式の言語タグを指定する文字列です。 言語が指定されていないか知られていない場合や、トラックに音声が含まれていない場合は空文字列 ("") です。

例えば、トラックで使用されている主要言語がアメリカ英語の場合、この値は "en-US" になります。 ブラジルポルトガル語の場合、値は "pt-BR" になります。

仕様書

Specification
HTML
# dom-videotrack-language-dev

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
language

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
User must explicitly enable this feature.
Has more compatibility info.