Cannot play wav files

8 posts, 0 answers
  1. Jose
    Jose avatar
    10 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2013 Link to this post

    I am trying to reproduce wav files but I do not know what is the problem. I works with youtube but not with my files


    <telerik:RadMediaPlayer  ID="RadMediaPlayer1" runat="server"  Text="RadMediaPlayer"
                Height="281px" Width="500px">
                <Sources>
                     
      <%-- <telerik:MediaPlayerSource Path="http://www.youtube.com/watch?v=QuuUn2tm5wY" />--%>
                     <telerik:MediaPlayerSource  Path="C:/code/dotnet4/PAPortal/files/voxeo/Confirmed By Recipient_12820-469398-cfc3410d2d1bcf81e8decaf11e87dafd-0-ReminderID-4578795.wav" />
                </Sources>
    </telerik:RadMediaPlayer>
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Nov 2013 Link to this post

    Hi Jose,

    The MediaPlayerSource value should be either an absolute URL (like src="http://www.example.com/Music1.wav) or a relative URL ( URL that points to a file within a web site). In the sample mark-up you provided the YouTube video works fine since it is an absolute URL. I suggest you copy all the required media files to a specific folder inside your project and provide the relative URL as shown in the following code.

    ASPX:
    <telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" Height="281px" Width="500px">
        <Sources>
            <telerik:MediaPlayerSource Path="~/MediaFiles/Sample.wav" MimeType="audio/wav" />
        </Sources>
    </telerik:RadMediaPlayer>

    Also add the respective MIME settings to the Web Config file of your web site which can be done as follows:
    <system.webServer>
      <staticContent>
        <mimeMap fileExtension=".wav" mimeType="audio/wav" />
      </staticContent>
    </system.webServer>

    Hope this helps,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jose
    Jose avatar
    10 posts
    Member since:
    Oct 2013

    Posted 13 Nov 2013 Link to this post

    Hi Shinu, thanks for your answer


    I am getting an error when I Add the MIME settings to the Web Config file 

    Unable to start debugging on the web server. See help for common configuration errors. Running the web page outside of debugger may provide further information.

    make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start without debugging. You may also want to refer to the ASP.NET and AT: Server debugging topic in the online documentation

  5. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 18 Nov 2013 Link to this post

    Hello Jose,

    Try changing the MimeType to mp3 format and let me know about the result:
    <telerik:RadMediaPlayer ID="RadMediaPlayer1" runat="server" Width="640" Height="360px">
        <Sources>
            <telerik:MediaPlayerSource Path="Audio/audio1.wav" MimeType="audio/mpeg" />
        </Sources>
    </telerik:RadMediaPlayer>

    Please bear in mind that IE does not support wav sources:
    http://www.telerik.com/help/aspnet-ajax/mediaplayer-getting-started.html

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Jose
    Jose avatar
    10 posts
    Member since:
    Oct 2013

    Posted 18 Nov 2013 Link to this post


    Thank you very much

    That works for wav, but no for mp3 files. Do you know if I can make it work for mp3 files?

    Thanks
  7. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 21 Nov 2013 Link to this post

    Hi Jose,

    It should also work perfectly well for .mp3 files. I am attaching a sample web site to demonstrate that. Please run the application and let me know about the result.

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  8. Jose
    Jose avatar
    10 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    Thank you very much for your help.
    The real problem that I had is I am using siteMapNode for my pages and looks we cannot work with those urls. I had to use HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.ApplicationPath + file and pass it to the URL instead of Path="~/MediaFiles/Sample.wav"


    Thank you guys 
  9. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 26 Nov 2013 Link to this post

    Hi Jose,

    I am glad you have managed to resolve the issue. Generally, it should be enough to set the latter Path.

    Regards,
    Eyup
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017