Please Note: Here we are using a webkit property. That means this feature will work only in google chrome.
Google chrome supports it's own voice search property. We can add this property to our application by adding "x-webkit-speech" in our input fields. Here we can create a physical render and implement this feature.
<!-------------------CODE Begins----------------------------!>
if( typeof( SiebelAppFacade.GoogleVoicePR ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.GoogleVoicePR" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "GoogleVoicePRenderer", "SiebelAppFacade.GoogleVoicePR" );
SiebelAppFacade.GoogleVoicePR = ( function(){
function GoogleVoicePR( pm ){
SiebelAppFacade.GoogleVoicePR.superclass.constructor.call( this, pm );
var controls = this.GetPM().Get( "GetControls" );
var cntrl = controls[ "Last Name" ];
var lastNameCntrl = cntrl.GetInputName();
$('input[name="'+lastNameCntrl+'"]').attr("x-webkit-speech","x-webkit-speech");
}
SiebelJS.Extend( GoogleVoicePR, SiebelAppFacade.PhysicalRenderer );
return GoogleVoicePR;
}());
}
<!-------------------Code Ends------------------------------!>
Google chrome supports it's own voice search property. We can add this property to our application by adding "x-webkit-speech" in our input fields. Here we can create a physical render and implement this feature.
<!-------------------CODE Begins----------------------------!>
if( typeof( SiebelAppFacade.GoogleVoicePR ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.GoogleVoicePR" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "GoogleVoicePRenderer", "SiebelAppFacade.GoogleVoicePR" );
SiebelAppFacade.GoogleVoicePR = ( function(){
function GoogleVoicePR( pm ){
SiebelAppFacade.GoogleVoicePR.superclass.constructor.call( this, pm );
var controls = this.GetPM().Get( "GetControls" );
var cntrl = controls[ "Last Name" ];
var lastNameCntrl = cntrl.GetInputName();
$('input[name="'+lastNameCntrl+'"]').attr("x-webkit-speech","x-webkit-speech");
}
SiebelJS.Extend( GoogleVoicePR, SiebelAppFacade.PhysicalRenderer );
return GoogleVoicePR;
}());
}
<!-------------------Code Ends------------------------------!>