Can I get an iframe in TW to use the microphone (for a volumemeter in a classroomscreen wiki)

Here is my test:
http://szen.io/classroom/#%24%3A%2Fplugins%2FJJ%2Fclassroom%2Fwidgets%2Fvolume

<iframe src="https://szen.io/classroom/widgets/volumevisualizer" allow="microphone" width="600" height="400" style="" frameborder="1" allowTransparency="true">

Thank you for help!

1 Like

There are some js errors displayed the console, it looks to me like this volumevisuliser is not working

Hi @buggyj if you open it in another window with the button it works. It seems to be the IFrame that causes the problem.

it doesn’t work for me in either the latest firefox or chrome, with or without the iframe. (on unbuntu)

My mico works with this test site

there an illegal char (A hat) in this function

function soundAllowed(stream) {
  var AudioContext = (window.AudioContext || window.webkitAudioContext)
  var audioContent = new AudioContext();
  var streamSource = audioContent.createMediaStreamSource(stream);

  obj.analyser = audioContent.createAnalyser();
  streamSource.connect(obj.analyser);
  obj.analyser.fftSize = 512;
  obj.frequencyArray = new Float32Array(obj.analyser.fftSize);
  init()Â 
  loop()
}

this works

<iframe src="https://mdn.github.io/dom-examples/media/web-dictaphone/" allow="microphone" width="600" height="400" style="" frameborder="1" allowTransparency="true">

HI @buggyj thanks for your hlep!
Alas, I could not get your example to work in my wiki…
http://szen.io/classroom/#Test%20Iframe

I removed the  which was invisible for me… but still no result.

what platform (mobil etc) and browser are you using

Hi @buggyj ,
Singlefile on a server, windows and FF but https://szen.io/classroom/widgets/volumevisualizer/ also works on chrome and even edge, if

  • it runs directly in a normal window and
  • the microfone is activated
    …and you have to have some sound to see the effect.

your code is now working as an iframe within my tiddlywiki - I see that chrome is complaining that your site url is not ‘secure’ and so this is probably your problem now.

disregard that last comment - your site has started to work when I used https://

Thanks, I will have to renew the htaccess…

But I still have no result from sound input inside iframes in TW…

are you using

https://szen.io/classroom/#%24%3A%2Fplugins%2FJJ%2Fclassroom%2Fwidgets%2Fvolume

Thank you! A miracle, it finally works.