aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/mediadevices/getsupportedconstraints
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/mediadevices/getsupportedconstraints
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/mediadevices/getsupportedconstraints')
-rw-r--r--files/ja/web/api/mediadevices/getsupportedconstraints/index.html128
1 files changed, 128 insertions, 0 deletions
diff --git a/files/ja/web/api/mediadevices/getsupportedconstraints/index.html b/files/ja/web/api/mediadevices/getsupportedconstraints/index.html
new file mode 100644
index 0000000000..973a177674
--- /dev/null
+++ b/files/ja/web/api/mediadevices/getsupportedconstraints/index.html
@@ -0,0 +1,128 @@
+---
+title: MediaDevices.getSupportedConstraints()
+slug: Web/API/MediaDevices/getSupportedConstraints
+translation_of: Web/API/MediaDevices/getSupportedConstraints
+---
+<p>{{APIRef("Media Capture and Streams")}}</p>
+
+<p>{{domxref("MediaDevices")}} インタフェースの<code><strong>getSupportedConstraints</strong></code><strong><code>()</code></strong> メソッドは、{{domxref("MediaTrackSupportedConstraints")}}ディクショナリをベースとするオブジェクトを戻り値として返します。このオブジェクトのメンバーフィールドは、{{Glossary("user agent")}}が扱えるメディア制約に関するプロパティを表しています。</p>
+
+<h2 id="文法">文法</h2>
+
+<pre class="syntaxbox">var <em>supportedConstraints</em> = navigator.mediaDevices.getSupportedConstraints();</pre>
+
+<h3 id="パラメータ">パラメータ</h3>
+
+<p>なし。</p>
+
+<h3 id="戻り値">戻り値</h3>
+
+<p>{{domxref("MediaTrackSupportedConstraints")}}ディクショナリをベースにした新しいオブジェクトです。このオブジェクトはユーザエージェントが扱えるメディア制約の一覧を含みます。この一覧に含まれているものはユーザエージェントが取り扱えるものだけなので、全てのBoolean型のプロパティは<code>true</code>の値になっています。</p>
+
+<h2 id="Example" name="Example">例</h2>
+
+<p>この例は、実行中のブラウザでサポートされている制約の一覧を出力するものです。</p>
+
+<div class="hidden">
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html">&lt;p&gt;あなたのブラウザは、以下のメディア制約をサポートしています。&lt;/p&gt;
+
+&lt;ul id="constraintList"&gt;
+&lt;/ul&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css">body {
+  font: 15px Arial, sans-serif;
+}</pre>
+
+<h3 id="JavaScript">JavaScript</h3>
+</div>
+
+<pre class="brush: js">let constraintList = document.getElementById("constraintList");
+let supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
+
+for (let constraint in supportedConstraints) {
+ if (supportedConstraints.hasOwnProperty(constraint)) {
+ let elem = document.createElement("li");
+
+ elem.innerHTML = "&lt;code&gt;" + constraint + "&lt;/code&gt;";
+ constraintList.appendChild(elem);
+ }
+}</pre>
+
+<h3 id="実行結果">実行結果</h3>
+
+<p>{{ EmbedLiveSample('Example', 600, 350) }}</p>
+
+<h2 id="仕様">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ <th scope="col">状態</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Media Capture', '#widl-MediaDevices-getSupportedConstraints-MediaTrackSupportedConstraints', 'getSupportedConstraints()')}}</td>
+ <td>{{Spec2('Media Capture')}}</td>
+ <td>初版</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザ互換性">ブラウザ互換性</h2>
+
+<p>{{ CompatibilityTable }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Microsoft Edge</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(53)}}</td>
+ <td>{{CompatGeckoDesktop(44) }}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{ CompatUnknown }}</td>
+ <td>{{CompatOpera(40)}}</td>
+ <td>{{CompatSafari(11)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android Webview</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(53)}}</td>
+ <td>{{CompatChrome(52)}}</td>
+ <td>{{ CompatGeckoMobile(50) }}</td>
+ <td>{{ CompatUnknown }}</td>
+ <td>{{CompatOperaMobile(40)}}</td>
+ <td>{{CompatSafari(11)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>