doc_media-node-creation.html 780 B

123456789101112131415161718192021222324252627282930
  1. <!-- Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ -->
  3. <!doctype html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8"/>
  7. <title>Web Audio Editor test page</title>
  8. </head>
  9. <body>
  10. <script type="text/javascript;version=1.8">
  11. "use strict";
  12. let ctx = new AudioContext();
  13. let audio = new Audio();
  14. let meNode, msNode, mdNode;
  15. navigator.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia;
  16. navigator.getUserMedia({ audio: true, fake: true }, stream => {
  17. meNode = ctx.createMediaElementSource(audio);
  18. msNode = ctx.createMediaStreamSource(stream);
  19. mdNode = ctx.createMediaStreamDestination();
  20. }, () => {});
  21. </script>
  22. </body>
  23. </html>