This is a migrated thread and some comments may be shown as answers.

Captcha Audio

4 Answers 225 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
rootberg
Top achievements
Rank 2
rootberg asked on 22 Mar 2010, 04:00 PM
Is there a way to get the "CaptchaAudio" to automatically play from the page rather then forcing the user to download a WAV file and open it?

The only way I could get this functionality was to write some javascript to capture the audio url from the Audio link; create another button that embeds and fires the audio from that link, and hide the automatically generated Audio Link Text (see code).

It would be nice if the RadCaptcha control did this automatically.

...
<style type="text/css">
.rcCaptchaAudioLink {display: none;}
</style>
...
<telerik:RadCaptcha...
...
<img src="Images/audio_but.png" alt="Play Sound" onclick="PlaySound()" />
<span id="SoundSpan"></span>
...
<script type="text/javascript">
function PlaySound() {
var soundHRef = document.getElementById("RadCaptcha1_CaptchaAudioCode");
        document.getElementById("SoundSpan").innerHTML = "<embed src='" + soundHRef.getAttribute("href").toString() + "' hidden='true' autostart='true' loop = false' />";
        }
</script>
...

4 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 22 Mar 2010, 04:25 PM
Hello Rootberg,

At the moment, the only way to play the audio, is to download the file, and play it locally on the computer. We are planning to embed the audio on the page, so the users will not need to first download the code. The feature will be available in some of the next releases of the RadControls for ASP.NET AJAX.


All the best,
Pero
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
rootberg
Top achievements
Rank 2
answered on 22 Mar 2010, 04:27 PM
Do you see any issue with the way I am doing this (security or otherwise)?
0
Accepted
Pero
Telerik team
answered on 22 Mar 2010, 04:36 PM
Hello Rootberg,

No. You are doing it in the right way.

The only "issue", maybe the fact that, the <embed> tag is not W3C XHTML 1.1 compliant. Since most browsers support <embed/>, even if the standards don't, you can use the extensibility of XHTML and write your own custom DTD that adds <embed/> to any flavour of XHTML.

Here is a forum discussion on this issue: http://www.accessifyforum.com/viewtopic.php?p=18919

Regards,
Pero
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
rootberg
Top achievements
Rank 2
answered on 22 Mar 2010, 04:41 PM
Thank you for your help! I will review this.
Tags
Captcha
Asked by
rootberg
Top achievements
Rank 2
Answers by
Pero
Telerik team
rootberg
Top achievements
Rank 2
Share this question
or