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

Radnotification no sound in mobile/tablet devices

1 Answer 118 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Jatin
Top achievements
Rank 1
Jatin asked on 21 Jan 2018, 01:29 PM

Dear Team,

We are using ShowSound property and it doesn't work in mobiles and tablets. However it is working fine in desktop browsers. I have already tried below code which i got from your website but still no difference.

<script type="text/javascript">function pageLoad() {//Attach to the document touchstart event and initiate the notification audio $telerik.$(document).on("touchstart", initSound);}function initSound() {var notification = $find("<%=RadNotification1.ClientID%>");//If notification audio is not available initiate itif (!notification.verifySound()) { notification.userInitSound();}//Detach the initSound event listener $telerik.$(document).off("touchstart", initSound);}</script><telerik:RadNotification RenderMode="Lightweight" ID="RadNotification1" runat="server" ShowInterval="2000" AutoCloseDelay="1000" Text="Some Notification" ShowSound="warning"></telerik:RadNotification>

I have also tried in code behind but result is same.

RadNotification1.ShowSound = ResolveUrl("~/Images/OrderReceived.wav");

Kindly let me know how we can enable sound on mobile/tablet devices.

Thanks & Regards,

Jatin Kumar Verma

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 23 Jan 2018, 11:35 AM
Hello Jatin,

We have tested this scenario on mobile devices with an iOS, Android, or Windows Phone operating system and they all play the sound, either a .wav file or a .mp3.

Keep in mind that the page should be touched by the user in order for the sound of the notification to work. 

Please find attached the sample project we used to test this scenario. In order to run it, you should just place the .NET 4.5 version of the Telerik.Web.UI.dll assembly in the bin folder of the project. We have used the 2018.1.117.45 version of the Telerik controls for our tests.

We have also added the explicit declaration of the mime-type for the .mp3 files, in case you are running an older version of IIS. Here you can read more on the topic: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap.

<configuration>
...
  <system.webServer>
    <staticContent>
      <remove fileExtension=".mp3"/>
      <mimeMap fileExtension=".mp3" mimeType="audio/mpeg"/>
      <remove fileExtension=".wav"/>
      <mimeMap fileExtension=".wav" mimeType="audio/wav"/>
    </staticContent>
...


Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Notification
Asked by
Jatin
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or