Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > RadCaptcha audio on chrome

Not answered RadCaptcha audio on chrome

Feed from this thread
  • santosh avatar

    Posted on Apr 24, 2011 (permalink)

    Hello Everyone,

    We are using radcaptcha for validating purpose. I have come across a weird problem with audio link button of captcha control. 

    Audio link button working fine on IE and firefox, but we are not able to play the ImageText multiple time on chrome. It works for the first click, but if we click multiple times on audio link button, its not playing Image Text.

    I  might need to enable some property for captcha control that i am not aware of.  

    Does any one have any suggestions??


    <telerik:RadCaptcha ID="radCaptcha" Runat="server" EnableRefreshImage="true" CaptchaImage-EnableCaptchaAudio="true" CaptchaImage-UseAudioFiles="true" ErrorMessage="You have entered an invalid code." ValidationGroup="Summary"  forecolor="#660000" Display="Dynamic" CaptchaLinkButtonText="Generate New Image<br/>" EnableEmbeddedScripts="True" EnableViewState="True" CaptchaImage-AudioFilesPath="~/App_Data/RadCaptcha" ImageStorageLocation="Cache" ViewStateMode="Enabled">
                        </telerik:RadCaptcha>

    Reply

  • Rumen Rumen admin's avatar

    Posted on Apr 25, 2011 (permalink)

    Hi Santosh,

    I am aware of this problem and it will be fixed in the next version.

    The problem seems to be caused by the way the browser plays the audio file of the <audio/> tag. Once Chrome plays the audio track, the current time is not moved at the start of the audio file, but it stays at the end. That's why when we try to play the audio once more, it is not played.

    After extensively testing and trying different things with the <audio/> DOM object in Chrome, I found a way of making the audio file play more than once. Here is the JS code. Place it below the ScriptManager of the page where the RadCapthca resides, and see if it will work:

    <script type="text/javascript">
        Telerik.Web.UI.RadCaptcha.prototype.onAudioPlay = function(e)
        {
            if(this._objectElement)
            {
                this._objectElement.Play();
            }
            elseif(this._audioElement && this._audioElement.play)
            {
                if($telerik.isChrome)
                {
                    this._audioElement.load();
                }
                this._audioElement.play();
            }
            return $telerik.cancelRawEvent(e);
        
    </script>

    Let me know if you still experience problems.



    Kind regards,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • santosh avatar

    Posted on Apr 26, 2011 (permalink)


    Great!!!!  it worked for me. 

    Thank You. I appreciate your help.

    Reply

  • Tigran avatar

    Posted on Jun 21, 2011 (permalink)

    Any idea why captcha audio would not work in IE7?

    It works fine in our other browsers but not in IE7. We even tried the Telerik demo site and still no joy.

    Thanks

    Reply

  • Pero Pero admin's avatar

    Posted on Jun 22, 2011 (permalink)

    Hi Tigran,

    The RadCaptcha plays the audio code using the HTML5 <audio/> tag. If the browser does not support such tag, then it plays it using an <embed/> tag that requires QuickTime plugin required. IE7 does not support <audio/> tag so please make sure you have installed the QuickTime plugin.

    Kind regards,
    Pero
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > RadCaptcha audio on chrome