Audio playback issues with Google Chrome
Hi,
I have an experiment where participants listen to a word and then respond by pressing a key. I have more than 1000 trials. Everything works fine in Firefox but in Google Chrome some words fail to play. I get the following error when running in Chrome: [Intervention] Blocked attempt to create a WebMediaPlayer as there are too many WebMediaPlayers already in existence
I'm really not experienced this so if anybody has any ideas on what I could try to get the experiment to work consistently in Chrome, I'd appreciate it!
Comments
Hi @sflu,
It seems that Chrome has a limit on the number of media players that can be assigned in a given tab. You can find workarounds here, as this issue has been reported before.
I don't know how your experiment is set up, but you could also try reusing/updating the media player element each time instead of creating a new one, or forcing resources to be properly released/destroyed after use...
Hope this helps,
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
Hi @cvanbuck,
Thank you for the info! I tried using an inline_javascript item to play the stimuli, as suggested in the forum post, but that didn't seem to fix the issue. Could you maybe advise on how to implement the other suggestions you mentioned, such as reusing the media player element or releasing resources? The trial structure is as follows: sketchpad with fixation dot, sketchpad with response options, sampler to play a file from the file pool, and a keyboard response item.
As a last resort, I'll make Firefox the only possible browser option but it would be great to be able to run the experiment in Chrome and Edge as well.
Thank you!
Hi @sflu,
Could you share your experiment file so that I can have a look?
Cheers,
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
I stripped it down to just the practice phase consisting of 10 trials because it was too big to upload here since the main experimental phase consists of 1000 trials. I think you're right that the issue has to do with Chrome limiting the number of media players because the stripped down version runs fine in Chrome whereas before some files in the practice phase didn't play.
Thanks so much!
Thanks!
So I know you had 1000 trials in total, but how was it distributed? For example, how many trials/repeats were initially in your training and test loop tables? And how many different audio files were in your file pool? I'm trying to reproduce the error with settings as close to yours as possible.
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
Hi,
So I had 10 trials in the practice phase and 1000 in the main experiment phase. In total, I have 1017 audio files in the file pool. 1010 files are the stimuli and 7 files are part of a check participants have to complete before the start of the practice phase to determine whether they are wearing headphones or not (they listen to a calibration noise to adjust the volume, and then have to pick which of the sounds they hear is the quietest). Based on the errors I got, the media player limit in Chrome may be set to 1000?
Thank you so much for your help!!
Mh, yes, theoretically, but I can't say for sure because I can't reproduce your Chrome error, even with 1033 audio files in the file pool and the same number of lines in a loop, or with two loops (a 10-trial loop + a 1033-trial loop)...
A few more questions:
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
@cvanbuck, interesting, did you get that media player error at all?
Yes, my version of Chrome should be up to date. I'm guessing you're also using the latest version of OpenSesame?
I've run the experiment several times, and the files that didn't play were always the same ones. The affected files (around 17 of the total) are alphabetically the last in the file pool but they are played in random order during the loop, so the error occurs throughout the experiment, not just after a certain number of trials have passed (if this makes sense). For example, the word 'viento' is part of the practice sequence but never plays when I run the experiment, even though it's only the 7th or so audio file that's being played in the entire experiment. Here's a link to the study: https://drive.google.com/file/d/17qE4ExubTX1kbsduFNfOVyrHXuXCQMRa/view?usp=sharing
Thanks so much for looking into this!
Simone
Hi again @platzf,
I ran the whole experiment and went through a first screen freeze; not sure if this was due to your debugging or if it was always there, but these words had a "1" right before their names in the loop table of the exp sequence: vista, viruela, invitado, viga.
So I fixed that and ran it again and... I didn't get a media player error at all. "viento" played fine during the training part, and I heard "vodka" during the test part, along with many others...
Honestly I'm not sure what's the problem here... I am indeed using the latest version of Opensame, but are you really? When I opened your file, I got this message:
Let me know,
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖
Thanks for all your help, @cvanbuck ! I just checked, I thought I had already downloaded the latest version, but I'll do so now, and run it again. I'll also have someone test the experiment on a different machine, maybe it's an issue specific to my set up since you didn't encounter any problems.
Thanks again!