aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/videotrack/label
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/videotrack/label
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/videotrack/label')
-rw-r--r--files/ja/web/api/videotrack/label/index.html80
1 files changed, 80 insertions, 0 deletions
diff --git a/files/ja/web/api/videotrack/label/index.html b/files/ja/web/api/videotrack/label/index.html
new file mode 100644
index 0000000000..e4278ef3e8
--- /dev/null
+++ b/files/ja/web/api/videotrack/label/index.html
@@ -0,0 +1,80 @@
+---
+title: VideoTrack.label
+slug: Web/API/VideoTrack/label
+tags:
+ - API
+ - HTML DOM
+ - Media
+ - Property
+ - Read-only
+ - Reference
+ - Video
+ - Video Track
+ - VideoTrack
+ - label
+ - metadata
+ - track
+translation_of: Web/API/VideoTrack/label
+---
+<div>{{APIRef("HTML DOM")}}</div>
+
+<p><span class="seoSummary">読み取り専用の <strong>{{domxref("VideoTrack")}}</strong> の <strong><code>label</code></strong> プロパティは、動画トラックの判読可能なラベルがある場合はそれを指定する文字列を返します。 それ以外の場合は、空の文字列を返します。</span></p>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox">var <em>videoTrackLabel</em> = <em>VideoTrack</em>.label;</pre>
+
+<h3 id="Value" name="Value">値</h3>
+
+<p>トラックのメタデータで利用可能な場合は、トラックの判読可能なラベルを指定する {{domxref("DOMString")}}。 それ以外の場合は、空の文字列(<code>""</code>)が返されます。</p>
+
+<p>例えば、{{domxref("VideoTrack.kind", "kind")}} が <code>"sign"</code> のトラックには、<code>"手話通訳"</code> などの <code>label</code> が付いている場合があります。</p>
+
+<h2 id="Example" name="Example">例</h2>
+
+<p>この例では、指定されたメディア要素の動画トラックを選択するためにユーザーインターフェイスで使用される可能性のあるトラックの kind とラベルの配列を返します。 リストは、特定の kind のトラックのみを通過させるようにフィルタ処理されています。</p>
+
+<pre class="brush: js">function getTrackList(el) {
+ var trackList = [];
+ const wantedKinds = [
+ "main", "alternative", "commentary"
+ ];
+
+ el.videoTracks.forEach(function(track) {
+ if (wantedKinds.includes(track.kind)) {
+ trackList.push({
+ id: track.id,
+ kind: track.kind,
+ label: track.label
+ });
+ }
+ });
+ return trackList;
+}</pre>
+
+<p>結果の <code>trackList</code> には、その <code>kind</code> が配列 <code>wantedKinds</code> の中の1つである動画トラックの配列を含み、各エントリはトラックの {{domxref("VideoTrack.id", "id")}}、{{domxref("VideoTrack.kind", "kind")}}、および {{domxref("VideoTrack.label", "label")}} を提供します。</p>
+
+<h2 id="Specifications" name="Specifications">仕様</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">状態</th>
+ <th scope="col">コメント</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', '#dom-videotrack-label', 'VideoTrack: label')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+
+
+<p>{{Compat("api.VideoTrack.label")}}</p>