Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/sound/core/seq/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  test_multi_mics.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/dom/media/webrtc/tests/mochitests/test_multi_mics.html


<!DOCTYPE HTML>
<html>
<head>
  <script type="application/javascript" src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<script type="application/javascript">
"use strict";

createHTML({
  title"Test the ability of opening multiple microphones via gUM",
  bug: "1238038",
});

runTest(async () => {
  // Ensure we use the real microphones by disabling loopback devices and fake devices.
  await pushPrefs(["media.audio_loopback_dev"""], ["media.navigator.streams.fake", false]);

  try {
    // Allow exposing microphone by calling gUM first
    const defaultStream = await navigator.mediaDevices.getUserMedia({ audio: true });
    for (const track of defaultStream.getTracks()) {
      track.stop();
    }

    const devices = await navigator.mediaDevices.enumerateDevices();
    // Create constraints
    let constraints = [];
    devices.forEach((device) => {
      if (device.kind === "audioinput") {
        constraints.push({
          audio: { deviceId: { exact: device.deviceId } },
        });
      }
    });
    if (constraints.length >= 2) {
      // Open microphones by the constraints
      let mediaStreams = [];
      for (const c of constraints) {
        let stream = await navigator.mediaDevices.getUserMedia(c);
        mediaStreams.push(stream);
      }
      // Close microphones
      for (const stream of mediaStreams) {
        for (const track of stream.getTracks()) {
          track.stop();
        }
      }
      mediaStreams = [];
    } else {
      dump("Skip test since we need at least two microphones\n");
    }
  } catch (e) {
    ok(false, e.name + ": " + e.message);
  }
});
</script>
</pre>
</body>
</html>

Messung V0.5
C=94 H=93 G=93

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.