Videos won't play after publishing

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

    Posted 20 May 2016 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">
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer1" runat="server" Source="" Width="300" />
    <p class="videoCaption">EMIS Purpose Overview</p>
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer2" runat="server" Source="" Width="300" />
    <p class="videoCaption">Homepage Access & Overview</p>
    <div class="videoWrapper">
    <telerik:RadMediaPlayer ID="videoPlayer3" runat="server" Source="" Width="300" />
    <p class="videoCaption">Printing Inspections</p>

  2. Eyup
    Eyup avatar
    3920 posts

    Posted 25 May 2016 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:

    2. Also, the CDN if present:
    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:

    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:

    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:

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

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Curt
    Curt avatar
    2 posts
    Member since:
    Mar 2016

    Posted 25 May 2016 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.

  4. hart
    hart avatar
    23 posts
    Member since:
    Jul 2008

    Posted 29 Dec 2016 in reply to Curt Link to this post

    Curt -- I am giving you 2 thumbs up on this.  Search for a long time, made the change to IIS like you said - and presto!!! All worked great!
  5. Stuart at Enjo Oz
    Stuart at Enjo Oz avatar
    3 posts
    Member since:
    Jun 2006

    Posted 11 Feb Link to this post

    Likewise from me Curt - spent hours trawling through forum posts wondering why I couldn't view videos on the live site but had no issues in dev environment.

    Great find, thanks for sharing :)

Back to Top