Videos won't play after publishing

3 posts, 0 answers
  1. Curt
    Curt avatar
    2 posts
    Member since:
    Mar 2016

    Posted 20 May Link to this post

    I have a gallery of three RadMediaPlayer controls.  The sources are added in the code behind.  The mp4 files are sitting in a folder at the root of the app.  The videos play in debug mode, but when I publish and upload to the dev web server, the video players don't play.  They are just black boxes.  I'm using IE11 and Chrome.  In debug mode, the videos all play in both browsers, but after publishing none of them play in either browser.  I have confirmed that the video files are included in the deployed published content and that the folder's path is consistent.  What would cause them to not play after publishing?

    Code behind snippet:

    protected void Page_Load(object sender, EventArgs e)
       {
           videoPlayer1.Source = ConfigurationManager.AppSettings["MediaUrl"] + "Video01_EMISPurposeOverview.mp4";
           videoPlayer2.Source = ConfigurationManager.AppSettings["MediaUrl"] + "Video02_AccessHomepageOverview.mp4";
           videoPlayer3.Source = ConfigurationManager.AppSettings["MediaUrl"] + "Video03_PrintingInspections.mp4";
           videoPlayer4.Source = ConfigurationManager.AppSettings["MediaUrl"] + "Video04_EnteringResultsResolutionOptions.mp4";
       }

    HTML snippet:

        <tr class="galleryRow">
    <td>
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer1" runat="server" Source="" Width="300" />
    <p class="videoCaption">EMIS Purpose Overview</p>
    </div>
    </td>
    <td>
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer2" runat="server" Source="" Width="300" />
    <p class="videoCaption">Homepage Access & Overview</p>
    </div>
    </td>
    <td>
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer3" runat="server" Source="" Width="300" />
    <p class="videoCaption">Printing Inspections</p>
    </div>
    </td>
    </tr>

  2. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 25 May Link to this post

    Hi Curt,

    Here are some common suggestions you can try to track down the reason for the issue:

    1. Remove RadCompression from your web.config in case it is enabled:
    http://www.telerik.com/help/aspnet-ajax/compression.html

    2. Also, the CDN if present:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/scriptmanager/cdn-support/overview
    Copy Code
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />

    3. Make sure that you are not using RadAjaxPanel or RadAjaxManager at the same time. They should not be implemented simultaneously:
    http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html


    4. If the issue remains, temporarily remove any ajaxification (RadAjaxManager) on the page and enable your script debugger (FireBug or F12) to see whether a more descriptive script or server error will arise. And if it does, you can debug the problematic lines of the application to track down the issue and root it out.


    Also, make sure that video Folder is not located within the App_Data folder. This name is reserved by Visual Studio to contain database related files:
    https://msdn.microsoft.com/en-us/library/ex526337.aspx


    Do the videos play if you set them declaratively in the mark-up definition?
    <telerik:RadMediaPlayer ID="videoPlayer1" runat="server" Source="~/VideoFolder/videoName.mp4" Width="300" />

    Essentially, the player control extends the default HTML5 video and audio tag (except for older IE versions) and the available formats are entirely dependent on the browser capabilities. In this sense, the player should play any video or audio which is playable via the default <video> and <audio> tags:
    http://www.w3schools.com/html/html5_video.asp

    http://www.w3schools.com/html/html5_audio.asp

    Please try the source path with a regular video tag and let me know if the browser plays it as expected.


    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Curt
    Curt avatar
    2 posts
    Member since:
    Mar 2016

    Posted 25 May Link to this post

    Thanks for the suggestions.

    The problem was in IIS.  Under MIME Types, .mp4 was not included.  We added .mp4 to the MIME Types, restarted IIS and that fixed the problem.

Back to Top