Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  test_groupId.html   Sprache: HTML

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


<!DOCTYPE HTML>
<html>
<head>
  <script src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<script type="application/javascript">
createHTML({ title"Test group id of MediaDeviceInfo", bug: "1213453" });

async function getDefaultDevices() {
  const devices = await navigator.mediaDevices.enumerateDevices();
  is(devices.length, 2, "Two fake devices found.");

  devices.forEach(d => isnot(d.groupId, """GroupId is included in every device"));

  const videos = devices.filter(d => d.kind == "videoinput");
  is(videos.length, 1, "One video device found.");
  const audios = devices.filter(d => d.kind == "audioinput");
  is(audios.length, 1, "One microphone device found.");

  return {audio: audios[0], video: videos[0]};
}

runTest(async () => {
  // Force fake devices in order to be able to change camera name by pref.
  await pushPrefs(["media.navigator.streams.fake", true],
                  ["media.audio_loopback_dev"""],
                  ["media.video_loopback_dev"""]);

  const afterGum = await navigator.mediaDevices.getUserMedia({
    video: true, audio: true
  });
  afterGum.getTracks().forEach(track => track.stop());

  let {audiovideo} = await getDefaultDevices();

  /* The low level method to correlate groupIds is by device names.
   * Use a similar comparison here to verify that it works.
   * Multiple devices of the same device name are not expected in
   * automation. */
  isnot(audio.labelvideo.label"Audio label differs from video");
  isnot(audio.groupId, video.groupId, "Not the same groupIds");
  // Change video name to match.
  await pushPrefs(["media.getusermedia.fake-camera-name"audio.label]);
  ({audiovideo} = await getDefaultDevices());
  is(audio.labelvideo.label"Audio label matches video");
  is(audio.groupId, video.groupId, "GroupIds should be the same");
});
</script>
</pre>
</body>
</html>

Messung V0.5
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.20 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge