Disable audio controls | XM Community
Skip to main content
Solved

Disable audio controls

  • February 23, 2022
  • 8 replies
  • 1362 views

Forum|alt.badge.img+1

Hello,
I am displaying some audios in my survey, I would like to disable the controls (scroll bar and play/pause buttons). My current code is the next one:

Best answer by Rudi

Hi Ana,

it looks like you can't really disable the controls.
a solution could be to set autoplay, remove the controls, show another icon/image on the page (else the respondent might wonder that she/he gets an empty page and add an auto-forward function on the question that clicks the next button after the audio file will have ended.

Qualtrics.SurveyEngine.addOnReady(function()
{
setTimeout(function () {jQuery('#NextButton').click();},4000);
});

note that the time (bold) is in miliseconds.
Best regards
Rudi

8 replies

Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • February 24, 2022

Hi
could you please share the link to the audio file?
Best regards

Rudi


Forum|alt.badge.img+1
  • Author
  • February 24, 2022

Hi Rudi,
this is the link, it is an audio in my library
">https://uoit.eu.qualtrics.com/CP/File.php?F=F_cYL9oYzdhHkE">


Forum|alt.badge.img+1
  • Author
  • February 24, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/43972#Comment_43972Hi Rudi,
this is the link, it is an audio in my library
">https://uoit.eu.qualtrics.com/CP/File.php?F=F_cYL9oYzdhHkE">


Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • Answer
  • February 25, 2022

Hi Ana,

it looks like you can't really disable the controls.
a solution could be to set autoplay, remove the controls, show another icon/image on the page (else the respondent might wonder that she/he gets an empty page and add an auto-forward function on the question that clicks the next button after the audio file will have ended.

Qualtrics.SurveyEngine.addOnReady(function()
{
setTimeout(function () {jQuery('#NextButton').click();},4000);
});

note that the time (bold) is in miliseconds.
Best regards
Rudi


Forum|alt.badge.img+1
  • Author
  • February 25, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/44055#Comment_44055It worked! Thank you so much Rudi. However, now the audio is being played twice at the same time, it sounds like an echo. Do you know why this could be happening?
This is my current html code
">https://uoit.eu.qualtrics.com/CP/File.php?F=F_cYL9oYzdhHkE">

And I used your JS code as well.


Rudi
QPN Level 3 ●●●
Forum|alt.badge.img+16
  • QPN Level 3 ●●●
  • February 25, 2022

Hi
this might be due to the preview mode and mobile version. maybe you publish the survey and test the anonymous link.

Best regards

Rudi



Forum|alt.badge.img+1
  • Author
  • February 25, 2022

Forum|alt.badge.img+4
  • September 22, 2022

Rudi I am hoping you can help me with a similar issue. I want participants to have play/pause controls, but I want to disable download/playback rate adjustment.
I was able to do this for most users with controlslist="nodownload noplaybackrate" but I am having trouble with the playback rate option persisting on iPhones. Do you have any idea what could be causing this?
Here is my code: