Reputation: 1
I am having trouble getting a survey question to autoplay an audio file using qualtrics. This is the html code I'm using:
<audio class="qmedia" controls="true" height="40" preload="auto" width="320" autoplay="autoplay">
<source src="https://utk.co1.qualtrics.com/CP/File.php?F=F_9S61rh9MT5n55xH" type="audio/mp3" /><embed class="qmedia" flashvars="file=https://utk.co1.qualtrics.com/CP/File.php?F=F_9S61rh9MT5n55xH&width=320&height=20&type=mp3&autostart=true" height="20" pluginspage="http://adobe.com/flashplayer/" src="../WRQualtricsShared/Flash/flvplayer.swf" type="application/x-shockwave-flash" width="320" wmode="transparent"></embed></audio>
The issue I'm having is that the autoplay attribute causes the file to play multiple times on top of itself. Any thoughts about why this might be happening?
Upvotes: 0
Views: 848
Reputation: 5004
Looks like you are playing it from html5 and flash. Take out the flash embed; you don't need it.
Also, if you are in preview mode it will play in both the desktop and mobile frames. That is only an issue in preview mode, but if it is important to you could have JavaScript detect preview mode and if it does, find the audio in the mobile frame and mute it.
Upvotes: 1