Captcha autoplays audio when the page loads

2 posts, 0 answers
  1. Paul Duncan
    Paul Duncan avatar
    6 posts
    Member since:
    Sep 2007

    Posted 15 Oct 2010 Link to this post

    Captcha autoplays audio when the page loads.  Is there anyway to stop this? We'd like the audio to only play when they click the link.. 

    You can see/hear the behavior here:

  2. Pero
    Pero avatar
    1156 posts

    Posted 18 Oct 2010 Link to this post

    Hi Paul,

    By design the RadCaptcha will try playing the audio code using <audio/> html5 element. Since not all browsers support <audio/> tag, as a backup variant the code is played using the <embed/> tag, which requires the browser to install QuickTime plug-in. So, in case the plug-in is configured to play the media file immediately after the page is loaded, the audio code will be played immediately.

    To avoid this try setting autoplay attribute of the <embed/> tag to false, as shown in the following code:

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <script type="text/javascript">
            function pageLoad(application, args)
                var captcha = $find("RadCaptcha1");
                var objectElement = captcha._objectElement;
                objectElement.setAttribute("autoplay", "false");
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="ScriptManager1" runat="server">
            <telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Invalid Code" ValidationGroup="Group"
                ForeColor="Red" CaptchaImage-EnableCaptchaAudio="true">
            <asp:Button ID="Button1" runat="server" Text="Validate Code" ValidationGroup="Group" />

    All the best,
    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
Back to Top